You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, I'm loving the plugin, really nice job, but there's a problem, my build is always completed successfully even with type errors, I'd like to be able to catch the exception inside of catch so I can exit the build unsuccessfully.
well, no sure what happen, but I'm talking about esbuild-plugin-typecheck.
Edit: Another bug I just found is that is checking for files I didn't even include in the bundle... like it'd a normal cli tsc.
The text was updated successfully, but these errors were encountered:
I'll have to try this again to see if it's possible. Type checking happens in a completely separate worker thread and it's almost completely disconnected from esbuild, other than it starts at the same time.
It might help to think of it like this: when esbuild starts, it runs tsc and forgets about it. It was designed like this to integrate with my livereload plugin and to deliver errors asynchronously, potentially a very long time after esbuild finishes since TypeScript is so much slower.
It might be possible to add an option that runs it in a "blocking" mode, where the build waits for this plugin to finish, but I seem to recall having issues with that when I was first working on this.
Edit: Another bug I just found is that is checking for files I didn't even include in the bundle... like it'd a normal cli tsc.
Yeah, that's by design. This plugin isn't nearly as complicated as fork-ts-checker-webpack-plugin, it basically just looks for the proper tsconfig.json file and infers which build mode to use based on the options and then does something very similar to invoking tsc.
I'm sure it's possible to build up the files array based on esbuild's dependency graph, but that would delay the initial type check until after esbuild finished, so it's a tradeoff. I'm not opposed to it, but I probably won't be working on it in the near future.
First off, I'm loving the plugin, really nice job, but there's a problem, my build is always completed successfully even with type errors, I'd like to be able to catch the exception inside of
catch
so I can exit the build unsuccessfully.well, no sure what happen, but I'm talking about
esbuild-plugin-typecheck
.Edit: Another bug I just found is that is checking for files I didn't even include in the bundle... like it'd a normal cli tsc.
The text was updated successfully, but these errors were encountered: