Skip to content

Commit ce6f8b9

Browse files
committed
Add watch options.build.styleResources as default in dev mode
1 parent 20d16e8 commit ce6f8b9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/builder/builder.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,11 +668,15 @@ module.exports = class Builder {
668668
.on('unlink', refreshFiles)
669669

670670
// Watch for custom provided files
671-
const watchFiles = _.map(_.uniq(this.options.build.watch), p =>
671+
let customPatterns = _.concat(
672+
this.options.build.watch,
673+
..._.values(_.omit(this.options.build.styleResources, ['options']))
674+
)
675+
customPatterns = _.map(_.uniq(customPatterns), p =>
672676
upath.normalizeSafe(p)
673677
)
674678
this.customFilesWatcher = chokidar
675-
.watch(watchFiles, options)
679+
.watch(customPatterns, options)
676680
.on('change', refreshFiles)
677681
}
678682

0 commit comments

Comments
 (0)