-
Notifications
You must be signed in to change notification settings - Fork 142
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
Add rollup declarations plugin #2200
Conversation
02ffe58
to
75e15b5
Compare
There is also the fix for |
it's been a while for me, but I remember TS 5.5 did not fix the issue, though i did not try setting explicitly |
We discussed at tooling team, this seems worth landing. |
75e15b5
to
7dc949a
Compare
This invokes glint as a rollup plugin, and contains a workaround for broken gts imports, see typed-ember/glint#628
7dc949a
to
1124f06
Compare
Green now and ready for review! |
This invokes glint as a rollup plugin, and contains a workaround for broken gts imports, see typed-ember/glint#628.
This is an attempt to fix this long standing issue, which Glint v2 seems to fix. But we want this to work now, so v2 addons have a blessed way to support gts files. It's influenced by previous attempts (embroider-build/addon-blueprint#255, embroider-build/addon-blueprint#292), but takes a slightly different approach:
@embroider/addon-dev
so people don't have inlined plugin code in their rollup configjscodeshift
to rewrite broken imports (strip the.gts
extension), but I was hesitant to bring in that large dependency for that simple task. Rewriting import paths using a simple regex seems safe enough to me, especially since this is operating only on Glint-emitted code (no custom formatting expected)glint
executableThe long-term idea is that once Glint v2 is out, we can use that for the plugin, removing the workaround and ideally invoking programmatic Glint APIs instead of spawning it as a new process. But all of that without causing much churn for users, as they should be able to keep their rollup config unchanged.
Here is how this would be eventually adopted in the blueprint: embroider-build/addon-blueprint#315