tildeio / ember-element-helper

Dynamic element helper for Glimmer templates.
MIT License
44 stars 23 forks source link

Can we drop the ast transform? #81

Closed ef4 closed 2 years ago

ef4 commented 2 years ago

I don't understand why this addon uses an AST transform to rewrite element to -element.

If it's an attempt at future-compatibility with a glimmer-native implementation, that seems defeated by the fact that this addon already ships a helper named element anyway. So why not use that helper and eliminate the need for a custom transform?

The motivation for eliminating the transform is that we do not intend to let v2 addons automatically install AST transforms, so if this is kept it's going to become an extra manual step that users of the addon will need to deal with.

SergeAstapov commented 2 years ago

just for more info on the context: AST transform rewrites element to component (ensure-safe-component (-helper)), so it does little bit more than just renaming template helper.