1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

Fix support for undefined tasks in watch.js

Amends 596ff7a8ee
This commit is contained in:
Chauncey McAskill
2023-08-10 11:01:50 -04:00
committed by GitHub
parent 95caf9ebb5
commit e9dbb03207

View File

@@ -70,16 +70,18 @@ function configureServer(server, { paths, tasks }) {
});
// Watch source concats
server.watch(
resolve(
tasks.concats.reduce(
(patterns, { includes }) => patterns.concat(includes),
[]
if (tasks.concats?.length) {
server.watch(
resolve(
tasks.concats.reduce(
(patterns, { includes }) => patterns.concat(includes),
[]
)
)
)
).on('change', () => {
concatFiles(...developmentConcatFilesArgs);
});
).on('change', () => {
concatFiles(...developmentConcatFilesArgs);
});
}
// Watch source styles
server.watch(