Webpack: implicit TerserPlugin
This commit is contained in:
parent
111ae408b2
commit
cb399a3878
1 changed files with 0 additions and 18 deletions
|
@ -4,7 +4,6 @@ console.log('Running in production mode'); // eslint-disable-line no-console
|
||||||
const { merge } = require('webpack-merge');
|
const { merge } = require('webpack-merge');
|
||||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||||
const OfflinePlugin = require('@lcdp/offline-plugin');
|
const OfflinePlugin = require('@lcdp/offline-plugin');
|
||||||
const TerserPlugin = require('terser-webpack-plugin');
|
|
||||||
const CompressionPlugin = require('compression-webpack-plugin');
|
const CompressionPlugin = require('compression-webpack-plugin');
|
||||||
const sharedConfig = require('./shared');
|
const sharedConfig = require('./shared');
|
||||||
|
|
||||||
|
@ -15,23 +14,6 @@ module.exports = merge(sharedConfig, {
|
||||||
bail: true,
|
bail: true,
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: true,
|
minimize: true,
|
||||||
minimizer: [
|
|
||||||
// This doesn't work unless I pass a function... wut
|
|
||||||
compiler => {
|
|
||||||
new TerserPlugin({
|
|
||||||
parallel: true,
|
|
||||||
|
|
||||||
terserOptions: {
|
|
||||||
warnings: false,
|
|
||||||
mangle: false,
|
|
||||||
|
|
||||||
output: {
|
|
||||||
comments: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}).apply(compiler);
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
Loading…
Reference in a new issue