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']),