-
-
Notifications
You must be signed in to change notification settings - Fork 627
webpack-cli v4-beta.8 ignoring loader's error. #1581
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
and exits with 0. |
/cc @webpack/cli-team need fix and tests |
I will debug it. |
@mstssk I have the following observations with
|
Exit code 0 means the code was executed successfully without any failures. So if webpack fails it should exit with a non-zero exit code. Please correct me if I'm wrong. |
@snitin315 Thank you for your help.
Oops! I typoed it. I edit this issue's description. |
I think then it's working as expected against the |
@snitin315 Can you add test on this? |
Yes. Work in progress. |
* tests: loader's error regression test for #1581 * tests: add test on error code * tests: add tests in case of warnings from loader Co-authored-by: Anshuman Verma <anshu.av97@gmail.com>
Describe the bug
webpack-cli v4-beta.8 ignoring loader's error.
Reproduction code: https://github.com/mstssk/webpack-cli-v4-beta8-ignore-loader-error
I wrote reproduction code of ts-loader, but this problem occurs with other loaders. e.g. file-loader.
What is the current behavior?
webpack-cli v3.3.11 fails and returns exit code 2 when an error occurs in loaders.
But webpack-cli v4.0.0-beta.8 does not fail and return exit code 0.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
webpack fails and returns non-zero exit code when an error occurs in loaders.
Screenshots
Please paste the results of
webpack-cli info
here, and mention other relevant informationwebpack-cli info
fails in my env.`webpack-cli info` Log
Additional context
#1222 (comment)
The text was updated successfully, but these errors were encountered: