mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
Merge pull request #2884 from shirohana/feature/watch-style-resources
Feature: watch `options.build.styleResources` as default in dev mode
This commit is contained in:
commit
f45a114021
@ -668,11 +668,15 @@ module.exports = class Builder {
|
||||
.on('unlink', refreshFiles)
|
||||
|
||||
// Watch for custom provided files
|
||||
const watchFiles = _.map(_.uniq(this.options.build.watch), p =>
|
||||
let customPatterns = _.concat(
|
||||
this.options.build.watch,
|
||||
..._.values(_.omit(this.options.build.styleResources, ['options']))
|
||||
)
|
||||
customPatterns = _.map(_.uniq(customPatterns), p =>
|
||||
upath.normalizeSafe(p)
|
||||
)
|
||||
this.customFilesWatcher = chokidar
|
||||
.watch(watchFiles, options)
|
||||
.watch(customPatterns, options)
|
||||
.on('change', refreshFiles)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user