Skip to content

Commit

Permalink
Fix user cancel showing messages (#745)
Browse files Browse the repository at this point in the history
* Fix user cancel showing messages

* work

* Missing deps
  • Loading branch information
StephenWeatherford authored Jan 16, 2019
1 parent 363cca6 commit d1d6601
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 23 deletions.
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

0 comments on commit d1d6601

Please sign in to comment.