Reorganize and refactor build routine

This commit is contained in:
QWp6t
2016-11-06 22:31:49 -08:00
parent c1bb2b3a27
commit 8c9ba0546b
8 changed files with 107 additions and 94 deletions

View File

@@ -21,15 +21,14 @@ const config = mergeWithConcat({
},
enabled: {
sourceMaps: !isProduction,
minify: isProduction,
optimize: isProduction,
cacheBusting: isProduction,
watcher: !!argv.watch,
uglifyJs: !(argv.p || argv.optimizeMinimize),
},
watch: [],
}, userConfig);
config.watch.push(config.copy);
config.watch.push(`${path.basename(config.paths.assets)}/${config.copy}`);
config.watch = uniq(config.watch);
Object.keys(config.entry).forEach(id =>