-
Notifications
You must be signed in to change notification settings - Fork 137
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
Support strict mode templates #893
Merged
Merged
Conversation
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
we really use them all
This is staying as draft until we can get a mainline package released instead of making people depend on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is part of a project to unify Ember's inline template compilation.
@ef4/babel-plugin-htmlbars-inline-precompile
is a published copy of https://github.com/ember-cli/babel-plugin-htmlbars-inline-precompile/tree/streamline. (It's easier to make typescript happy by using a published copy rather than pointing at git.)The plan here is to make a new babel-plugin-htmlbars-inline-precompile that only support Ember 3.27+. Because that drops the need for modules-api-polyfill, much complexity can be removed and it becomes easier to compose babel plugins together, reducing the need to keep babel-plugin-htmlbars-inline-precompile a dumping ground of unrelated features (like ember-template-imports).
While we're at it, I'd prefer to rename babel-plugin-htmlbars-inline-precompile to
@ember/template-compilation
, because that is its public API:The older patterns like
import { hbs } from 'ember-cli-htmlbars'
are still available, but are understood to be sugar forprecompile
, becauseprecompile
is a superset of all the rest and it should be understood as the foundational primitive for all template compilation in ember. Even standalone.hbs
files are conceptually sugar forexport default precompileTemplate(...)
.The actual rename will presumably need an RFC, but for purposes of this discussion I'm calling the new version
@ember/template-compilation
.Everybody else who wants to build on top of template compilation does so by composing with
@ember/template-compilation
.scope
, instead of doingwindow.define
. Embroider will be made to use this new pattern when ember 3.27+ is present, while keeping the old implementation on older embers for now.@ember/template-compilation
on Ember 3.27+. On older embers it will keep the present behavior.