Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to terser-webpack-plugin #125

Merged
merged 5 commits into from
Feb 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ Types of changes:

- For compatibility with version 4 of `pixi.js`, use `@robotlegsjs/pixi` version 1.

#### Security

- Migrate to [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin) to solve security vulnerability (see #125).

## Robotlegs-Pixi 1.0.0

### [v1.0.1](https://github.com/RobotlegsJS/RobotlegsJS-Pixi/releases/tag/1.0.1) - 2019-10-24
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"bluebird": "^3.7.2",
"browserify-versionify": "^1.0.6",
"chai": "^4.2.0",
"clean-webpack-plugin": "^3.0.0",
"es6-map": "^0.1.5",
"es6-symbol": "^3.1.3",
"glslify": "^7.0.0",
Expand All @@ -99,12 +100,12 @@
"rimraf": "^3.0.2",
"sinon": "^8.1.1",
"sinon-chai": "^3.4.0",
"terser-webpack-plugin": "^2.3.5",
"ts-loader": "^6.2.1",
"ts-node": "^8.6.2",
"tslint": "^6.0.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.7.5",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.41.6",
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3",
Expand Down
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const webpack = require("webpack");
const path = require("path");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");

module.exports = env => {
if (!env) env = { production: false, karma: false };
Expand Down Expand Up @@ -51,10 +51,10 @@ module.exports = env => {
concatenateModules: true,
minimize: true,
minimizer: [
new UglifyJsPlugin({
new TerserPlugin({
cache: true,
parallel: 4,
uglifyOptions: {
terserOptions: {
output: {
comments: false
}
Expand Down
3 changes: 3 additions & 0 deletions webpack.example.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const webpack = require("webpack");
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const SimpleProgressPlugin = require("webpack-simple-progress-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");

module.exports = options => {
return {
Expand All @@ -23,6 +24,8 @@ module.exports = options => {
},

plugins: [
new CleanWebpackPlugin(),

new HtmlWebpackPlugin({
template: path.resolve("static/index.html"),
inject: false
Expand Down
Loading