From 810a3abf13e18570d35808a1172dd34f516c0493 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 25 Apr 2018 08:03:34 +0200 Subject: Upgrade Kotlin to 1.2.40 and kotlin-fronted-plugin to 0.0.30 (with webpack 4) Dependencies on kotlinx.serialization and kotlinx.coroutines. --- webpack.config.d/jquery.js | 8 -------- webpack.config.d/minify.js | 17 ++++++++++++++--- webpack.config.d/mode.js | 4 ++++ 3 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 webpack.config.d/mode.js (limited to 'webpack.config.d') diff --git a/webpack.config.d/jquery.js b/webpack.config.d/jquery.js index 8c942e79..40522595 100644 --- a/webpack.config.d/jquery.js +++ b/webpack.config.d/jquery.js @@ -2,11 +2,3 @@ config.plugins.push(new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery" })); - -config.module.rules.push({ - test: require.resolve('jquery'), - use: [{ - loader: 'expose-loader', - options: 'jQuery' - }] -}) diff --git a/webpack.config.d/minify.js b/webpack.config.d/minify.js index 3bc8e884..d85c861c 100644 --- a/webpack.config.d/minify.js +++ b/webpack.config.d/minify.js @@ -1,5 +1,16 @@ if (defined.PRODUCTION) { - config.plugins.push(new webpack.optimize.UglifyJsPlugin({ - minimize: true - })); + const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); + + config.optimization = { + minimizer: [ + new UglifyJSPlugin({ + uglifyOptions: { + compress: { + unused: false + } + } + }) + ] + } + } diff --git a/webpack.config.d/mode.js b/webpack.config.d/mode.js new file mode 100644 index 00000000..c86e018e --- /dev/null +++ b/webpack.config.d/mode.js @@ -0,0 +1,4 @@ +config.mode = "development" +if (defined.PRODUCTION) { + config.mode = "production" +} -- cgit