Updated to webpack 5 and updated configs

This commit is contained in:
Richard Davey 2021-09-21 14:41:11 +01:00
parent 424583efcd
commit 0020dc5486
5 changed files with 2246 additions and 8162 deletions

View file

@ -16,7 +16,7 @@
* `BitmapMask.scene` is a new property that allows the Bitmap Mask to reference the Scene it was created in.
* The `DOMElement.preUpdate` method has been removed. If you overrode this method, please now see `preRender` instead.
* `DOMElement.preRender` is a new method that will check parent visibility and improve its behavior, responding to the parent even if the Scene is paused or the element is inactive. Dom Elements are also no longer added to the Scene Update List. Fix #5816 (thanks @prakol16 @samme)
*
* Phaser 3 is now built with webpack 5 and all related packages have been updated.
### Bug Fixes

View file

@ -1,7 +1,7 @@
'use strict';
const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
module.exports = {
@ -31,18 +31,19 @@ module.exports = {
optimization: {
minimizer: [
new UglifyJSPlugin({
new TerserPlugin({
include: /\.min\.js$/,
parallel: true,
sourceMap: false,
uglifyOptions: {
extractComments: false,
terserOptions: {
format: {
comments: false
},
compress: true,
ie8: false,
ecma: 5,
output: {comments: false},
warnings: false
},
warningsFilter: () => false
}
})
]
},

View file

@ -1,7 +1,7 @@
'use strict';
const webpack = require('webpack');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
mode: 'production',
@ -25,18 +25,19 @@ module.exports = {
optimization: {
minimizer: [
new UglifyJSPlugin({
new TerserPlugin({
include: /\.min\.js$/,
parallel: true,
sourceMap: false,
uglifyOptions: {
extractComments: false,
terserOptions: {
format: {
comments: false
},
compress: true,
ie8: false,
ecma: 5,
output: {comments: false},
warnings: false
},
warningsFilter: () => false
}
})
]
},

10352
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -65,22 +65,22 @@
],
"devDependencies": {
"@types/source-map": "^0.5.7",
"clean-webpack-plugin": "^3.0.0",
"clean-webpack-plugin": "^4.0.0",
"dts-dom": "^3.6.0",
"eslint": "^7.11.0",
"eslint": "^7.32.0",
"eslint-plugin-es5": "^1.5.0",
"exports-loader": "^1.1.1",
"fs-extra": "^9.0.1",
"imports-loader": "^1.2.0",
"jsdoc": "^3.6.6",
"node-sloc": "^0.1.12",
"remove-files-webpack-plugin": "^1.4.4",
"exports-loader": "^3.0.0",
"fs-extra": "^10.0.0",
"imports-loader": "^3.0.0",
"jsdoc": "^3.6.7",
"node-sloc": "^0.2.0",
"remove-files-webpack-plugin": "^1.4.5",
"source-map": "^0.7.3",
"typescript": "^4.0.3",
"uglifyjs-webpack-plugin": "^2.2.0",
"terser-webpack-plugin": "^5.2.4",
"typescript": "^4.4.3",
"vivid-cli": "^1.1.2",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack": "^5.53.0",
"webpack-cli": "^4.8.0",
"webpack-shell-plugin": "^0.5.0"
},
"dependencies": {