Skip to content

added section on difference between building with or without prod flag #5195

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

Conversation

stiasta
Copy link

@stiasta stiasta commented Mar 3, 2017

My team spent a long time figuring out why our code broke when building our project with the --prod flag compared to when we did not.

Since we don't know much about the build process in angular-cli we did not know what the real difference was when using the flag.

We finally found out that constructor.name did not work when building prod.

Therefore this pull request contains a warning with example and a "difference" section.
I know that tree shaking is done and uglifying. Is there more that could be added?

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels Mar 3, 2017
@stiasta stiasta force-pushed the example-and-specifying-difference-between-building-with-or-without-prod-flag branch from f0ecd02 to 8383d53 Compare March 3, 2017 11:10
@stiasta stiasta force-pushed the example-and-specifying-difference-between-building-with-or-without-prod-flag branch from 8383d53 to 6d08b10 Compare March 3, 2017 11:28
@stiasta
Copy link
Author

stiasta commented Mar 3, 2017

perhaps a lint warning should be added aswell ?

@vfedoriv
Copy link

vfedoriv commented Mar 6, 2017

BTW, maybe need add something like this:

-- aot flag is enabled by default with a production build

@filipesilva
Copy link
Contributor

I agree that these differences should be documented, and maybe a new flag to opt-in minification.

We can't add this flag now however, and the documentation shouldn't focus so much on the effects of minification however.

I'll track this in #5315.

@filipesilva filipesilva closed this Mar 8, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants