diff --git a/app/webpack.prod.config.js b/app/webpack.prod.config.js index db7e6dfdb5..aaae8b1022 100644 --- a/app/webpack.prod.config.js +++ b/app/webpack.prod.config.js @@ -6,6 +6,8 @@ const merge = require('webpack-merge').default; const config = require('./webpack.config'); const WPPlugin = require('@jupyterlab/builder').WPPlugin; +const TerserPlugin = require('terser-webpack-plugin'); + config[0] = merge(config[0], { mode: 'production', @@ -16,8 +18,23 @@ config[0] = merge(config[0], { filename: '[name].[contenthash].js?v=[contenthash]', }, optimization: { - minimize: false, - }, + minimize: true, + minimizer: [ + new TerserPlugin({ + parallel: true, + terserOptions: { + compress: false, + ecma: 6, + mangle: true, + output: { + beautify: false, + comments: false + }, + safari10: true + } + }) + ] +}, plugins: [ new WPPlugin.JSONLicenseWebpackPlugin({ excludedPackageTest: (packageName) =>