Commit 28070da
Add rfc931: 'native' option to preserve template() output
Adds an `rfc931` option controlling how the RFC 931 `template()` API
(from `@ember/template-compiler`) is emitted:
- "polyfilled" (default): existing behavior — lower `template()` to
`precompileTemplate`/`createTemplateFactory` + `setComponentTemplate`
+ `templateOnly`, for runtimes without native `template()` support.
- "native": preserve the `template()` call for runtimes that implement
`@ember/template-compiler` natively (Ember 6+). AST transforms still
run, and the implicit `eval` form is normalized into the explicit
`scope` form.
This only affects `targetFormat: 'hbs'`. With `targetFormat: 'wire'` the
template is fully compiled to the standard wire format, which already
runs on native runtimes, so `native` has no effect there.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e95b0cd commit 28070da
3 files changed
Lines changed: 431 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
29 | 42 | | |
30 | 43 | | |
31 | 44 | | |
| |||
86 | 99 | | |
87 | 100 | | |
88 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
89 | 119 | | |
90 | 120 | | |
91 | 121 | | |
| |||
0 commit comments