-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suport for noEmitOnError? #57
Comments
Hi! :) |
Although I haven't checked recently, I believe ts-loader already supports this (I think some of our execution tests depend on it). |
I'd close the issue if there's no more to do |
Yes, thank you. @johnnyreilly ts-loader has it working. But I want to use it with happypack, and then the emit prevention won't work. |
@knaos I just realized what you want to achieve and why it won't work. If you are using transpileOnly mode, ts-loader doesn't know about semantic errors so it's not possible to block emit. The information about errors is in the fork-ts-checker-webpack-plugin. Support for this setting would be possible only in the "async: false" mode, where type-checking and emitting is synchronized. There is @johnnyreilly what do you think about that? |
Yup - I'd be open to a PR on that 👍 |
@johnnyreilly I'm curious about the status of this issue. Is it now possible to do so? |
Uh I don't think anything has been implemented related to this so I guess not.. don't actually know |
@johnnyreilly I'll try to implement it on Actually, I was thinking about building a new loader to have accept a function in options to listen to some hooks and decide if it should allow emitting files or not. Kind of: { loader: 'some-loader', options: { listen: (done, fail) => { /* decide here if it should allow emitting or not */ } } } So it could work as a general solution rather than a solution only for |
I don't know - now's your chance! |
@johnnyreilly got it working!. Listening to |
Great! |
@johnnyreilly I wrote what I was using as a Maybe something like it could be implemented inside Anyway, it works with my current configuration in build and watch mode. The first build is usually slower in |
It's been some time. I figured how to make the compiler work with I wrote the loader from scratch. First as part of an experiment, then it turned out to work fairly well. |
If that line will be invoked before So if we could move this code to an earlier stage (ex. afterCompile or even shouldEmit), it would possibly fix that issue. @johnnyreilly |
Hey @piotr-oles, @eddyw, @johnnyreilly, @knaos, @vepanimas, We've hit the same issue and spent some time to investigate it. @vepanimas, It turns out that |
Do you want to raise a speculative PR and let's see where it goes? |
Here is the PR - #337. |
Did you have the chance to take a look at the PR? |
Sorry I'm currently snowed @Fatme I will try and take a look but it won't be immediately I'm afraid |
Hey guys, is it possible to use the
noEmitOnError
from tsconfig.json?The text was updated successfully, but these errors were encountered: