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

Fix user cancel showing messages #745

Merged
merged 3 commits into from
Jan 16, 2019
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
75 changes: 52 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@
"mocha-junit-reporter": "^1.18.0",
"mocha-multi-reporters": "^1.1.7",
"string-replace-webpack-plugin": "^0.1.3",
"terser-webpack-plugin": "^1.2.1",
"ts-loader": "^5.3.0",
"ts-node": "^7.0.1",
"tslint": "^5.11.0",
Expand Down
13 changes: 13 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const fse = require('fs-extra');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const StringReplacePlugin = require("string-replace-webpack-plugin");
const TerserPlugin = require('terser-webpack-plugin');

const packageLock = fse.readJSONSync('./package-lock.json');

Expand Down Expand Up @@ -82,6 +83,18 @@ const config = {
...getExternalsEntries()
}
],
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
// https://github.com/webpack-contrib/terser-webpack-plugin/

// Without this, parseError() will not recognize user cancelled errors. Also makes debugging easier in production.
keep_classnames: true
}
}),
],
},
plugins: [
// Clean the dist folder before webpacking
new CleanWebpackPlugin(
Expand Down