Kaynağa Gözat

Replaced UglifyJS with Terser.

Kamil Piechaczek 6 yıl önce
ebeveyn
işleme
30760cbb3e
3 değiştirilmiş dosya ile 577 ekleme ve 456 silme
  1. 1 1
      package.json
  2. 6 5
      scripts/docs/snippetadapter.js
  3. 570 450
      yarn.lock

+ 1 - 1
package.json

@@ -101,7 +101,7 @@
     "react-dom": "^16.9.0",
     "style-loader": "^1.0.0",
     "svgo": "^1.1.0",
-    "uglifyjs-webpack-plugin": "^1.3.0",
+    "terser-webpack-plugin": "^2.2.1",
     "umberto": "^1.0.0",
     "webpack": "^4.39.1"
   },

+ 6 - 5
scripts/docs/snippetadapter.js

@@ -12,7 +12,7 @@ const webpack = require( 'webpack' );
 const { bundler, styles } = require( '@ckeditor/ckeditor5-dev-utils' );
 const CKEditorWebpackPlugin = require( '@ckeditor/ckeditor5-dev-webpack-plugin' );
 const MiniCssExtractPlugin = require( 'mini-css-extract-plugin' );
-const UglifyJsWebpackPlugin = require( 'uglifyjs-webpack-plugin' );
+const TerserPlugin = require( 'terser-webpack-plugin' );
 const ProgressBarPlugin = require( 'progress-bar-webpack-plugin' );
 
 const DEFAULT_LANGUAGE = 'en';
@@ -309,14 +309,15 @@ function getWebpackConfig( snippets, config ) {
 
 		optimization: {
 			minimizer: [
-				new UglifyJsWebpackPlugin( {
+				new TerserPlugin( {
 					sourceMap: true,
-					uglifyOptions: {
+					terserOptions: {
 						output: {
-							// Preserve license comments starting with an exclamation mark.
+							// Preserve CKEditor 5 license comments.
 							comments: /^!/
 						}
-					}
+					},
+					extractComments: false
 				} )
 			]
 		},

Dosya farkı çok büyük olduğundan ihmal edildi
+ 570 - 450
yarn.lock