Skip to content

hedgepigdaniel/webpack-error-on-warnings-plugin

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

Purpose

Compilation warnings are only useful if developers read them, and if there are too many warnings nobody reads any of them.

Using this plugin enforces that warnings are fixed regularly, by making the webpack build fail if there are warnings.

Installation

$ yarn add webpack-error-on-warnings-plugin

Usage

// webpack.config.babel.ts

import ErrorOnWarningsPlugin from 'webpack-error-on-warnings-plugin';

export default {
  // ...
  plugins: [
    new ErrorOnWarningsPlugin(),
  ],
};

Recommendations

Don't use it for typical watching development builds, since many warnings don't prevent valid experimentation (e.g. autoformatter warnings). Instead, run the check regularly but outside very tight development cycles - e.g. in CI. This way only a small number of warnings will be visible during development, maximising the chance that they will be useful.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published