diff options
author | ThibG <thib@sitedethib.com> | 2019-06-05 13:28:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-05 13:28:05 +0200 |
commit | ff74aaca7cd532065f24829a3ac16de809bacf3f (patch) | |
tree | ba851bcad4bf9f657a0c2414ac3befdea9acea15 /config/webpack/production.js | |
parent | 58946fef3c05342289c1c50132996fc4fd01cf68 (diff) | |
parent | 02b56c7e1a0fa561af9a85f765ec22eee3053561 (diff) |
Merge pull request #1093 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'config/webpack/production.js')
-rw-r--r-- | config/webpack/production.js | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/config/webpack/production.js b/config/webpack/production.js index c829ff6f1..bceffaf5c 100644 --- a/config/webpack/production.js +++ b/config/webpack/production.js @@ -5,7 +5,7 @@ const { URL } = require('url'); const merge = require('webpack-merge'); const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); const OfflinePlugin = require('offline-plugin'); -const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); +const TerserPlugin = require('terser-webpack-plugin'); const CompressionPlugin = require('compression-webpack-plugin'); const { output } = require('./configuration'); const sharedConfig = require('./shared'); @@ -33,20 +33,10 @@ module.exports = merge(sharedConfig, { optimization: { minimize: true, minimizer: [ - new UglifyJsPlugin({ + new TerserPlugin({ cache: true, parallel: true, sourceMap: true, - - uglifyOptions: { - compress: { - warnings: false, - }, - - output: { - comments: false, - }, - }, }), ], }, @@ -64,6 +54,7 @@ module.exports = merge(sharedConfig, { }), new OfflinePlugin({ publicPath: output.publicPath, // sw.js must be served from the root to avoid scope issues + safeToUseOptionalCaches: true, caches: { main: [':rest:'], additional: [':externals:'], |