Skip to content

Commit 729b78e

Browse files
Merge pull request #46 from RobotlegsJS/migrate-to-terser-webpack-plugin
Migrate to terser-webpack-plugin
2 parents eba9a78 + 46ccb40 commit 729b78e

File tree

4 files changed

+765
-551
lines changed

4 files changed

+765
-551
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ Types of changes:
4141
- in case of vulnerabilities.
4242
-->
4343

44+
#### Security
45+
46+
- Migrate to [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) to solve security vulnerability (see #46).
47+
4448
## RobotlegsJS Phaser-CE SignalCommandMap 1.0.0
4549

4650
### [v1.0.1](https://github.com/RobotlegsJS/RobotlegsJS-Phaser-CE-SignalCommandMap/releases/tag/1.0.1) - 2019-10-31

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@
6161
"reflect-metadata": "^0.1.13"
6262
},
6363
"devDependencies": {
64-
"@types/bluebird": "^3.5.28",
65-
"@types/chai": "^4.2.4",
66-
"@types/mocha": "^5.2.7",
67-
"@types/sinon": "^7.5.0",
68-
"@types/webpack-env": "^1.14.1",
69-
"bluebird": "^3.7.1",
64+
"@types/bluebird": "^3.5.29",
65+
"@types/chai": "^4.2.9",
66+
"@types/mocha": "^7.0.1",
67+
"@types/sinon": "^7.5.1",
68+
"@types/webpack-env": "^1.15.1",
69+
"bluebird": "^3.7.2",
7070
"browserify-versionify": "^1.0.6",
7171
"chai": "^4.2.0",
7272
"es6-map": "^0.1.5",
@@ -76,31 +76,31 @@
7676
"istanbul-instrumenter-loader": "^3.0.1",
7777
"karma": "^4.4.1",
7878
"karma-chrome-launcher": "^3.1.0",
79-
"karma-coverage-istanbul-reporter": "^2.1.0",
79+
"karma-coverage-istanbul-reporter": "^2.1.1",
8080
"karma-es6-shim": "^1.0.0",
8181
"karma-mocha": "^1.3.0",
8282
"karma-mocha-reporter": "^2.2.5",
8383
"karma-sinon-chai": "^2.0.2",
8484
"karma-sourcemap-loader": "^0.3.7",
8585
"karma-sourcemap-writer": "^0.1.2",
8686
"karma-webpack": "^4.0.2",
87-
"mocha": "^6.2.2",
87+
"mocha": "^7.0.1",
8888
"phaser-ce": "^2.13.3",
89-
"prettier": "^1.18.2",
89+
"prettier": "^1.19.1",
9090
"publish-please": "^5.5.1",
91-
"puppeteer": "^2.0.0",
91+
"puppeteer": "^2.1.1",
9292
"reflect-metadata": "^0.1.13",
93-
"rimraf": "^3.0.0",
94-
"sinon": "^7.5.0",
95-
"sinon-chai": "^3.3.0",
93+
"rimraf": "^3.0.2",
94+
"sinon": "^9.0.0",
95+
"sinon-chai": "^3.4.0",
96+
"terser-webpack-plugin": "^2.3.5",
9697
"ts-loader": "^6.2.1",
97-
"ts-node": "^8.4.1",
98-
"tslint": "^5.20.0",
98+
"ts-node": "^8.6.2",
99+
"tslint": "^6.0.0",
99100
"tslint-config-prettier": "^1.18.0",
100-
"typescript": "^3.6.4",
101-
"uglifyjs-webpack-plugin": "^2.2.0",
102-
"webpack": "^4.41.2",
103-
"webpack-cli": "^3.3.10",
104-
"webpack-dev-server": "^3.9.0"
101+
"typescript": "^3.7.5",
102+
"webpack": "^4.41.6",
103+
"webpack-cli": "^3.3.11",
104+
"webpack-dev-server": "^3.10.3"
105105
}
106106
}

webpack.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const webpack = require("webpack");
22
const path = require("path");
3-
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
3+
const TerserPlugin = require("terser-webpack-plugin");
44

55
module.exports = env => {
66
if (!env) env = { production: false, karma: false };
@@ -55,10 +55,10 @@ module.exports = env => {
5555
concatenateModules: true,
5656
minimize: true,
5757
minimizer: [
58-
new UglifyJsPlugin({
58+
new TerserPlugin({
5959
cache: true,
6060
parallel: 4,
61-
uglifyOptions: {
61+
terserOptions: {
6262
output: {
6363
comments: false
6464
}

0 commit comments

Comments
 (0)