Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #19 from ckeditor/i/1353
Browse files Browse the repository at this point in the history
Other: Replaced UglifyJS with Terser. See ckeditor/ckeditor5#1353.
  • Loading branch information
Reinmar authored Nov 26, 2019
2 parents 729fe00 + 4cea1d0 commit b2734ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"postcss-loader": "^3.0.0",
"raw-loader": "^3.1.0",
"style-loader": "^1.0.0",
"uglifyjs-webpack-plugin": "^1.3.0",
"terser-webpack-plugin": "^2.2.1",
"webpack": "^4.39.1",
"webpack-cli": "^3.3.6"
},
Expand Down
9 changes: 5 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const path = require( 'path' );
const webpack = require( 'webpack' );
const { bundler, styles } = require( '@ckeditor/ckeditor5-dev-utils' );
const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
const UglifyJsWebpackPlugin = require( 'uglifyjs-webpack-plugin' );
const TerserPlugin = require( 'terser-webpack-plugin' );

module.exports = {
devtool: 'source-map',
Expand All @@ -31,14 +31,15 @@ module.exports = {

optimization: {
minimizer: [
new UglifyJsWebpackPlugin( {
new TerserPlugin( {
sourceMap: true,
uglifyOptions: {
terserOptions: {
output: {
// Preserve CKEditor 5 license comments.
comments: /^!/
}
}
},
extractComments: false
} )
]
},
Expand Down

0 comments on commit b2734ca

Please sign in to comment.