Skip to content

Commit

Permalink
build: bump webpack integration (NG-ZORRO#2524)
Browse files Browse the repository at this point in the history
build: bump webpack integration
  • Loading branch information
JLHwung authored and vthinkxie committed Nov 30, 2018
1 parent 865b274 commit fc9ea8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions integration/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
8 changes: 6 additions & 2 deletions integration/webpack/webpack.config.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down Expand Up @@ -45,6 +45,11 @@ module.exports = {
},
]
},
optimization: {
minimizer: [new TerserPlugin({
parallel: true
})]
},
resolve: {
extensions: ['.js', '.ts'],
},
Expand All @@ -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']),
Expand Down

0 comments on commit fc9ea8a

Please sign in to comment.