diff --git a/gulpfile.js b/gulpfile.js index c1197d47b8..3b23361836 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -137,7 +137,7 @@ const thirdparty = gulp.parallel(mocha) const assets = gulp.parallel(html, thirdparty, icons) -const build = gulp.parallel(assets, js) +const build = gulp.series(js, assets) const main = gulp.series(build, native) diff --git a/webpack.common.js b/webpack.common.js index 9b365e2ae4..dee1b731e5 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -15,9 +15,6 @@ module.exports = { test: path.join(__dirname, 'src', 'entries', 'test.js'), native: path.join(__dirname, 'src', 'entries', 'native.js'), }, - optimization: { - splitChunks: { chunks: 'all' }, - }, output: { path: path.resolve(__dirname, 'dist', 'js'), publicPath: '/dist/js/', diff --git a/webpack.dev.js b/webpack.dev.js index aeb467d607..f82db7eac0 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -5,6 +5,9 @@ const webpack = require('webpack') module.exports = merge(common, { mode: 'development', devtool: 'cheap-module-source-map', + optimization: { + splitChunks: { chunks: 'async' }, + }, plugins: [ new webpack.DefinePlugin({ 'DEBUG': JSON.stringify(true) diff --git a/webpack.prod.js b/webpack.prod.js index dc137daaed..40007b6b7f 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -8,6 +8,9 @@ const webpack = require('webpack') module.exports = merge(common, { mode: 'production', devtool: 'source-map', + optimization: { + splitChunks: { chunks: 'all' }, + }, plugins: [ new webpack.DefinePlugin({ DEBUG: JSON.stringify(!process.env['CI'])