This commit is contained in:
notgne2 2020-02-13 21:46:39 -07:00
parent 94107ba215
commit 4dccf699aa

View File

@ -109,7 +109,7 @@ const productionPlugins = [
}), }),
]; ];
let plugins = [ let plugins = (env, argv) => [
new CopyPlugin([{ from: 'data', to: 'data' }, { from: 'wand.js', to: 'wand.js' }]), new CopyPlugin([{ from: 'data', to: 'data' }, { from: 'wand.js', to: 'wand.js' }]),
new HtmlWebpackPlugin({ new HtmlWebpackPlugin({
hash: true, hash: true,
@ -171,5 +171,5 @@ module.exports = (env, argv) => ({
new TerserPlugin({ terserOptions: jsMin }), new TerserPlugin({ terserOptions: jsMin }),
], ],
}, },
plugins: [...plugins, ...(argv.mode == 'production' ? productionPlugins : [])], plugins: [...plugins(env, argv), ...(argv.mode == 'production' ? productionPlugins : [])],
}) })