aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/webpack.config.js b/webpack.config.js
index a705f669..331ed338 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,6 +1,7 @@
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
+const ESLintPlugin = require('eslint-webpack-plugin');
module.exports = (env, argv) => {
const dev = argv.mode !== 'production';
@@ -35,7 +36,6 @@ module.exports = (env, argv) => {
},
module: {
rules: [
- { test: /\.jsx?$/, loader: 'eslint-loader', enforce: 'pre', exclude: /node_modules/, options: { failOnWarning: false, failOnError: true, fix: true } },
{ test: /\.js$/, loader: 'babel-loader' },
{
test: /\.css$/,
@@ -64,7 +64,8 @@ module.exports = (env, argv) => {
]
},
plugins: [
- new MiniCssExtractPlugin({ filename: 'style.css', allChunks: true })
+ new MiniCssExtractPlugin({ filename: 'style.css', allChunks: true }),
+ new ESLintPlugin({ files: 'src/main/assets', lintDirtyModulesOnly: true, failOnWarning: false, failOnError: true, fix: false })
],
};
if (!dev) {