emberjs / babel-plugin-ember-template-compilation

Babel implementation of Ember's low-level template-compilation API
9 stars 11 forks source link

implementing rfc931 #21

Closed ef4 closed 1 year ago

ef4 commented 1 year ago

Edited to add: the call signature in the RFC has changed, this PR needs updating to that new call signature.

This implements https://github.com/emberjs/rfcs/pull/931, which defines a stable low-level representation for template tags.

When using targetFormat: 'hbs' it acts as a polyfill for the ahead-of-time compiler as described in the RFC, using only stable public APIs. Assuming the RFC is approved and implemented, this implementation could change so it leaves template() alone, rather than replacing it with precompileTemplate and setComponentTemplate.

When using targetFormat: 'wire' it's not really a polyfill, since this package is the definitive implementation.

There are skipped tests to cover cases that are important but will depend on https://github.com/glimmerjs/glimmer-vm/pull/1421