Open chancancode opened 11 months ago
I was told that the vite experience already supports this out of the box, but I haven't personally used/verified it.
We also want to make sure this doesn't, by default, apply to incoming v2 addons, as v2 addons are expected to already be published with the "template()
with scope function bag" format, at least without some kind of opt-in (see #1635)
I was told that the vite experience already supports this out of the box, but I haven't personally used/verified it.
ye, example: https://github.com/NullVoxPopuli/polaris-starter/blob/main/vite.config.mts#L12
The goal is that eventually
@embroider/webpack
should support<template>
in.gjs
/.gts
file natively by implementing a webpack loader for these files that does thetemplate()
down-leveling, and a built-in babel plugin to further down-level it into the "template()
with scope function bag" format, without having to installember-template-imports
.Implementation wise, we can either depend on
ember-template-imports
and import its utility functions/babel plugin, or we can bring our own version and disableember-template-imports
if detected, like we do withember-cli-htmlbars
. Either way, we definitely want non-Embroider apps to be able to use the feature viaember-template-imports
, and it should at least not error when used in a version of Embroider with native<template>
support.