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

[BUGFIX release] Adds isProduction flag for the template compiler #19081

Merged
merged 4 commits into from Aug 10, 2020

Conversation

pzuraq
Copy link
Contributor

@pzuraq pzuraq commented Aug 5, 2020

This PR adds an isProduction flag option to the template compiler that can be used to change the behavior of the compiler for production builds. We generally do this already for the JS side of Ember, but not for templates, and this closes that gap.

Notes:

Exposes an env.isProduction (or for legacy style AST plugins this.options.isProduction) boolean that can be used from within the plugin itself to toggle debug vs prod only behaviors.

Fixes #18598

@pzuraq pzuraq force-pushed the bugfix/production-template-compiler branch from d03722f to b05058e Compare August 5, 2020 20:38
@pzuraq pzuraq changed the title [FEAT] Adds isProduction flag for the template compiler [BUGFIX release] Adds isProduction flag for the template compiler Aug 5, 2020
…ent.

This allows us to thread through custom options and have them be typed
properly (e.g. `env.meta` no longer needs to be cast to
`StaticTemplateMeta`).
@rwjblue rwjblue force-pushed the bugfix/production-template-compiler branch from b05058e to 0cbf985 Compare August 10, 2020 02:33
@rwjblue
Copy link
Member

rwjblue commented Aug 10, 2020

@pzuraq - I pushed an updated implementation, this should be ready for another look...

Copy link
Contributor Author

@pzuraq pzuraq left a comment

Choose a reason for hiding this comment

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

Changes look perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increased asset size from -assert-implicit-component-helper-argument
2 participants