Skip to content

Commit 1d8fa16

Browse files
feat: watch config file
1 parent 4fd7d40 commit 1d8fa16

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/module.js

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const { resolve } = require('path')
12
const logger = require('./logger')
23
const { moduleExists } = require('./utils')
34

@@ -15,6 +16,18 @@ module.exports = function (moduleOptions) {
1516
...moduleOptions
1617
}
1718

19+
const filesToWatch = [
20+
'.eslintrc',
21+
'.eslintrc.json',
22+
'.eslintrc.yaml',
23+
'.eslintrc.yml',
24+
'.eslintrc.js'
25+
]
26+
27+
this.options.watch.push(
28+
...filesToWatch.map(file => resolve(this.options.rootDir, file))
29+
)
30+
1831
this.extendBuild((config, ctx) => {
1932
if (ctx.isDev && ctx.isClient) {
2033
config.module.rules.push({

0 commit comments

Comments
 (0)