const gulp = require('gulp');
const tasks = require('./utils/getTasks');

const isDev = process.env.NODE_ENV !== 'production';

const buildTasks = [
  tasks.static,
  tasks.images,
  tasks.icons,
  tasks.styles,
];

if (!isDev) {
  buildTasks.push(tasks.scripts);
}

const seriesTasks = [
  tasks.clean,
  gulp.parallel(...buildTasks),
];

if (isDev) {
  seriesTasks.push(tasks.serve);
}

gulp.task('default', gulp.series(...seriesTasks));

@@ -65,16 +65,52 @@
 Tasks');
+%0Aconst config = require('./config');
 %0A%0Aconst 
@@ -251,24 +251,60 @@
 %0A%0Aif (!isDev
+ %7C%7C config.scripts.publicPath === ''
 ) %7B%0A  buildT

Enable scripts task if publicPath is empty