Commit 1d7186e6 authored by Maciej Bukowski's avatar Maciej Bukowski

Switched to webpack@4.12 and UglifyJsWebpackPlugin.

parent 191b856c
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
echo "Building 'build/ckeditor.js'..." echo "Building 'build/ckeditor.js'..."
echo "" echo ""
webpack webpack --mode production
echo "" echo ""
echo "Done." echo "Done."
...@@ -49,12 +49,12 @@ ...@@ -49,12 +49,12 @@
"@ckeditor/ckeditor5-theme-lark": "^10.1.0", "@ckeditor/ckeditor5-theme-lark": "^10.1.0",
"@ckeditor/ckeditor5-upload": "^10.0.1", "@ckeditor/ckeditor5-upload": "^10.0.1",
"@ckeditor/ckeditor5-table": "^10.0.0", "@ckeditor/ckeditor5-table": "^10.0.0",
"babel-minify-webpack-plugin": "^0.3.0", "postcss-loader": "^2.1.5",
"postcss-loader": "^2.0.10",
"raw-loader": "^0.5.1", "raw-loader": "^0.5.1",
"style-loader": "^0.20.3", "style-loader": "^0.21.0",
"webpack": "^3.11.0", "uglifyjs-webpack-plugin": "^1.2.7",
"webpack-sources": "1.0.1" "webpack": "^4.12.2",
"webpack-cli": "^3.0.8"
}, },
"engines": { "engines": {
"node": ">=6.0.0", "node": ">=6.0.0",
......
...@@ -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 BabiliPlugin = require( 'babel-minify-webpack-plugin' ); const UglifyJsWebpackPlugin = require( 'uglifyjs-webpack-plugin' );
const buildConfig = require( './build-config' ); const buildConfig = require( './build-config' );
module.exports = { module.exports = {
...@@ -27,19 +27,28 @@ module.exports = { ...@@ -27,19 +27,28 @@ module.exports = {
library: buildConfig.moduleName library: buildConfig.moduleName
}, },
optimization: {
minimizer: [
new UglifyJsWebpackPlugin( {
sourceMap: true,
uglifyOptions: {
output: {
comments: /^\**!/
}
}
} ),
]
},
plugins: [ plugins: [
new CKEditorWebpackPlugin( { new CKEditorWebpackPlugin( {
language: buildConfig.config.language, language: buildConfig.config.language,
additionalLanguages: 'all' additionalLanguages: 'all'
} ), } ),
new BabiliPlugin( null, {
comments: false
} ),
new webpack.BannerPlugin( { new webpack.BannerPlugin( {
banner: bundler.getLicenseBanner(), banner: bundler.getLicenseBanner(),
raw: true raw: true
} ), } )
new webpack.optimize.ModuleConcatenationPlugin()
], ],
module: { module: {
......
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