-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
Some size tests :
Without
(Using @angular/cli v1.4.4) |
@Wykks can you check out my alternative solution in #5804 (comment) please? I prefer that one if it also works. |
The node only `global` object had been left in because it used to cause a build size regression with Angular. This doesn't seem to be the case anymore so it should be removed because it causes problematic interactions with some libraries. Fix angular#5804 Supersedes angular#7931
The node only `global` object had been left in because it used to cause a build size regression with Angular. This doesn't seem to be the case anymore so it should be removed because it causes problematic interactions with some libraries. Fix angular#5804 Supersedes angular#7931
The node only `global` object had been left in because it used to cause a build size regression with Angular. This doesn't seem to be the case anymore so it should be removed because it causes problematic interactions with some libraries. Fix angular#5804 Supersedes angular#7931
The node only `global` object had been left in because it used to cause a build size regression with Angular. This doesn't seem to be the case anymore so it should be removed because it causes problematic interactions with some libraries. Fix angular#5804 Supersedes angular#7931
the PR worked well. Hope it will be merged soon |
Tests with a slightly bigger project (angular/cli 1.5 & angular 5):
With
Yup, same size. I don't think there's any good reason to not disable |
The PR works perfect for me. |
The PR worked well |
Heya, will be merging this into the next 1.6 release. |
@filipesilva While I disagree with the root cause of this issue, if There's a few optimizations unrelated to Example code with default
Same code with
And again the same code with
You'll notice that the contentious webpacked Not a big deal in the grand scheme of things, but sometimes the |
@@ -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: |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
@kzc I was unaware that there was a better way to target the specific problem, and agree that it would be better. Would you be willing to put up a similar PR to makes it more specific? For the record our intention to address this class of problems is to wholly disable the node |
@filipesilva Since this project is one of the bigger users of |
The node only `global` object had been left in because it used to cause a build size regression with Angular. This doesn't seem to be the case anymore so it should be removed because it causes problematic interactions with some libraries. Fix angular#5804 Supersedes angular#7931
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
See #5804