-
-
Notifications
You must be signed in to change notification settings - Fork 640
Closed
Description
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:
- Setup [email protected], [email protected], and some loaders
- Write codes which raise error in loaders.
- Run webpack
- See error logs and status code.
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 information
webpack-cli info
fails in my env.
`webpack-cli info` Log
$ npx webpack-cli info
[webpack-cli] Promise rejection: TypeError: Cannot convert undefined or null to object
[webpack-cli] TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at Object.<anonymous> (/private/tmp/webpack-cli-v4-beta8-ignore-loader-error/node_modules/@webpack-cli/info/index.js:45:41)
at Generator.next (<anonymous>)
at /private/tmp/webpack-cli-v4-beta8-ignore-loader-error/node_modules/@webpack-cli/info/index.js:8:71
at new Promise (<anonymous>)
at __awaiter (/private/tmp/webpack-cli-v4-beta8-ignore-loader-error/node_modules/@webpack-cli/info/index.js:4:12)
at Object.info [as default] (/private/tmp/webpack-cli-v4-beta8-ignore-loader-error/node_modules/@webpack-cli/info/index.js:44:12)
at Function.run (/private/tmp/webpack-cli-v4-beta8-ignore-loader-error/node_modules/webpack-cli/lib/commands/ExternalCommand.js:34:51)
at WebpackCLI.runCommand (/private/tmp/webpack-cli-v4-beta8-ignore-loader-error/node_modules/webpack-cli/lib/webpack-cli.js:286:60)
at runCLI (/private/tmp/webpack-cli-v4-beta8-ignore-loader-error/node_modules/webpack-cli/lib/bootstrap.js:61:26)
Additional context
consp1racy
Metadata
Metadata
Assignees
Labels
No labels