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(@angular/cli): Disable comparisons feature in uglify compression in prod #7931

Merged
merged 1 commit into from
Nov 29, 2017
Merged
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
8 changes: 7 additions & 1 deletion packages/@angular/cli/models/webpack-configs/production.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ export function getProdConfig(wco: WebpackConfigOptions) {
}));
}

const uglifyCompressOptions: any = {};
const uglifyCompressOptions: any = {
// Disabled because of an issue with Uglify breaking seemingly valid code:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That statement is inaccurate. See mishoo/UglifyJS#2520 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too proficient in english, but it's written "an issue with Uglify", and not "an issue in Uglify". It's two different things, no ?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a mapbox-gl issue.

// https://github.com/angular/angular-cli/issues/5804
// Further investigation:
// https://github.com/mishoo/UglifyJS2/issues/2011
comparisons: false
};

if (buildOptions.buildOptimizer) {
// This plugin must be before webpack.optimize.UglifyJsPlugin.
Expand Down