diff --git a/webpack.config.js b/webpack.config.js index 9a18b39..593b157 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -95,19 +95,6 @@ const productionPlugins = [ jpegtran: { progressive: true }, svgo: null, }), -]; - -let plugins = [ - new CopyPlugin([{ from: 'data', to: 'data' }, { from: 'wand.js', to: 'wand.js' }]), - new HtmlWebpackPlugin({ - hash: true, - inject: true, - minify: htmlMin, - template: './template.html', - meta: { - viewport: 'width=360, initial-scale=1, maximum-scale=1' - } - }), new FaviconsWebpackPlugin({ logo: path.join(__dirname, 'data', 'images', 'icon.png'), inject: false, // manually in our template for now cos its fuckd @@ -122,6 +109,19 @@ let plugins = [ }), ]; +let plugins = [ + new CopyPlugin([{ from: 'data', to: 'data' }, { from: 'wand.js', to: 'wand.js' }]), + new HtmlWebpackPlugin({ + hash: true, + inject: true, + minify: argv.mode == 'production' ? htmlMin : false, + template: './template.html', + meta: { + viewport: 'width=360, initial-scale=1, maximum-scale=1' + } + }), +]; + module.exports = (env, argv) => ({ target: 'web', externals: {