Unverified Commit 3d3d2fa0 authored by Piotrek Koszuliński's avatar Piotrek Koszuliński Committed by GitHub

Merge pull request #29 from ckeditor/i/1353

Other: Replaced UglifyJS with Terser. See ckeditor/ckeditor5#1353.
parents 2f59a39f 3c0d7c6f
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
"postcss-loader": "^3.0.0", "postcss-loader": "^3.0.0",
"raw-loader": "^3.1.0", "raw-loader": "^3.1.0",
"style-loader": "^1.0.0", "style-loader": "^1.0.0",
"uglifyjs-webpack-plugin": "^1.3.0", "terser-webpack-plugin": "^2.2.1",
"webpack": "^4.39.1", "webpack": "^4.39.1",
"webpack-cli": "^3.3.6" "webpack-cli": "^3.3.6"
}, },
......
...@@ -11,7 +11,7 @@ const path = require( 'path' ); ...@@ -11,7 +11,7 @@ const path = require( 'path' );
const webpack = require( 'webpack' ); const webpack = require( 'webpack' );
const { bundler, styles } = require( '@ckeditor/ckeditor5-dev-utils' ); const { bundler, styles } = require( '@ckeditor/ckeditor5-dev-utils' );
const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' ); const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
const UglifyJsWebpackPlugin = require( 'uglifyjs-webpack-plugin' ); const TerserPlugin = require( 'terser-webpack-plugin' );
module.exports = { module.exports = {
devtool: 'source-map', devtool: 'source-map',
...@@ -31,14 +31,15 @@ module.exports = { ...@@ -31,14 +31,15 @@ module.exports = {
optimization: { optimization: {
minimizer: [ minimizer: [
new UglifyJsWebpackPlugin( { new TerserPlugin( {
sourceMap: true, sourceMap: true,
uglifyOptions: { terserOptions: {
output: { output: {
// Preserve CKEditor 5 license comments. // Preserve CKEditor 5 license comments.
comments: /^!/ comments: /^!/
} }
} },
extractComments: false
} ) } )
] ]
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment