From 94107ba2155f41846f9c66c6ef11f9c8ea19c226 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Thu, 13 Feb 2020 21:45:30 -0700 Subject: [PATCH] even more dev friendly I think --- webpack.config.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) 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: {