Skip to content

Commit e938bc2

Browse files
committed
fix(eslint): fix eslint config
1 parent 09874c3 commit e938bc2

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/config/webpack.config.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,7 @@ const modules = {
2525
test: /\.js$/,
2626
loader: 'eslint-loader',
2727
enforce: 'pre',
28-
exclude: /node_modules|webpackHotDevClient/,
29-
options: {
30-
cacheDirectory: true,
31-
configFile: ESLINT_PATH
32-
}
28+
exclude: /node_modules|webpackHotDevClient/
3329
}, {
3430
test: /\.js$/,
3531
exclude: /node_modules/,
@@ -115,6 +111,17 @@ if (isProd) {
115111
]
116112
devtool = 'source-map'
117113
plugins.push(
114+
new webpack.LoaderOptionsPlugin({
115+
test: /\.js$/,
116+
options: {
117+
eslint: {
118+
options: {
119+
cacheDirectory: true,
120+
configFile: ESLINT_PATH
121+
}
122+
}
123+
}
124+
}),
118125
new HtmlWebpackPlugin({
119126
title: 'Pixore',
120127
filename: 'index.html',

0 commit comments

Comments
 (0)