From fc9ea8acd2e7ee8263b9c26912f261fc2fcd607a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Fri, 30 Nov 2018 14:36:04 +0800 Subject: [PATCH] build: bump webpack integration (#2524) build: bump webpack integration --- integration/webpack/package.json | 4 ++-- integration/webpack/webpack.config.js | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/integration/webpack/package.json b/integration/webpack/package.json index 274f76ff4ae..d43d29f17e9 100644 --- a/integration/webpack/package.json +++ b/integration/webpack/package.json @@ -37,8 +37,8 @@ "@ngtools/webpack": "~7.0.0", "html-webpack-plugin": "^3.2.0", "typescript": "file:lib/typescript", - "uglifyjs-webpack-plugin": "^2.0.1", - "webpack": "^4.23.1", + "terser-webpack-plugin": "^1.1.0", + "webpack": "^4.26.0", "webpack-cli": "^3.1.2", "webpack-dev-server": "^3.1.10" } diff --git a/integration/webpack/webpack.config.js b/integration/webpack/webpack.config.js index 0000ac80ae8..b255b35e3ec 100644 --- a/integration/webpack/webpack.config.js +++ b/integration/webpack/webpack.config.js @@ -1,6 +1,6 @@ const path = require('path') const HtmlWebpackPlugin = require('html-webpack-plugin') -const UglifyJSPlugin = require('uglifyjs-webpack-plugin') +const TerserPlugin = require('terser-webpack-plugin') const { AngularCompilerPlugin } = require('@ngtools/webpack') function packageSort(packages) { @@ -45,6 +45,11 @@ module.exports = { }, ] }, + optimization: { + minimizer: [new TerserPlugin({ + parallel: true + })] + }, resolve: { extensions: ['.js', '.ts'], }, @@ -54,7 +59,6 @@ module.exports = { entryModule: path.resolve(__dirname, 'src/app/app.module#AppModule'), sourceMap: true }), - new UglifyJSPlugin(), new HtmlWebpackPlugin({ template: path.resolve(__dirname, 'src/index.html'), chunksSortMode: packageSort(['polyfills', 'main']),