Skip to content

Commit ea6f6e9

Browse files
committed
1 parent 17a0e5c commit ea6f6e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

template/build/webpack.base.conf.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function resolve (dir) {
88
return path.join(__dirname, '..', dir)
99
}
1010

11-
const lintingRule = {
11+
const createLintingRule = () => ({
1212
test: /\.(js|vue)$/,
1313
loader: 'eslint-loader',
1414
enforce: 'pre',
@@ -17,7 +17,7 @@ const lintingRule = {
1717
formatter: require('eslint-friendly-formatter'),
1818
emitWarning: !config.dev.showEslintErrorsInOverlay
1919
}
20-
}
20+
})
2121

2222
module.exports = {
2323
context: path.resolve(__dirname, '../'),
@@ -43,7 +43,7 @@ module.exports = {
4343
module: {
4444
rules: [
4545
{{#lint}}
46-
...(config.dev.useEslint ? [lintingRule] : []),
46+
...(config.dev.useEslint ? [createLintingRule()] : []),
4747
{{/lint}}
4848
{
4949
test: /\.vue$/,

0 commit comments

Comments
 (0)