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

Replaced UglifyJS with Terser #29

Merged
merged 2 commits into from
Nov 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,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