Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ You can read more about [Scaffolding](https://webpack.js.org/guides/scaffolding)
| Exit Code | Description |
| --------- | -------------------------------------------------- |
| `0` | Success |
| `1` | Warnings/Errors from webpack |
| `1` | Errors from webpack |
| `2` | Configuration/options problem or an internal error |

## Contributing and Internal Documentation
Expand Down
2 changes: 1 addition & 1 deletion packages/webpack-cli/lib/utils/Compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Compiler {
logger.error(err.stack || err);
process.exit(1); // eslint-disable-line
}
if (!outputOptions.watch && (stats.hasErrors() || stats.hasWarnings())) {
if (!outputOptions.watch && stats.hasErrors()) {
process.exitCode = 1;
}
if (outputOptions.json === true) {
Expand Down
2 changes: 1 addition & 1 deletion test/loader/warning-test/loader-warning.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ describe('loader warning test', () => {

expect(stdout).toContain('[1 warning]');
expect(stdout).toContain('This is a warning');
expect(exitCode).not.toEqual(0);
expect(exitCode).toEqual(0);
});
});
3 changes: 3 additions & 0 deletions test/loader/warning-test/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ module.exports = {
'my-loader': require.resolve('./my-loader'),
},
},
performance: {
hints: 'warning',
},
};