Table of contents
Even if build result with webpack has some warnings, build succeed with no error exit codes. This can be trouble if some developer carefully not sees the result of CI service. By changing warnings to errors, webpack can recognize every warning as errors.
This can happen especially if you use the
- webpack configuration
actionsin some file. build result has a warning 🐛
// loadUserLists. Not a loadUserList.;// ...
$ npm install --save-dev warnings-to-errors-webpack-plugin
Alternatively, using yarn.
$ yarn add --dev warnings-to-errors-webpack-plugin
const WarningsToErrorsPlugin = ;moduleexports =// ...plugins:;
Skip the emitting phase whenever there are warnings while compiling. This ensures that no assets are emitted that include warnings.
// webpack >= v4optimization:noEmitOnErrors: trueplugins:;;
// webpack v2 and v3plugins:;
MIT © Taehwan Noh