-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAT] Adds isProduction flag for the template compiler
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: - Does not expose the `isProduction` flag to AST transforms directly. This is purely for removing/replacing internal transforms. - It works by going over the list of plugins generated by `compileOptions` and removing or replacing them. This strategy was used for two reasons: 1. Default plugins are technically public and could be passed in by the user. There is already deduping logic to handle this. 2. Order matters. We have a couple of plugins that need to be replaced, and they need to be replaced in the same positition that they were added in.
- Loading branch information
Chris Garrett
committed
Aug 5, 2020
1 parent
13ff365
commit b05058e
Showing
5 changed files
with
157 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters