-
Notifications
You must be signed in to change notification settings - Fork 28
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
Update config templates to properly handle .gts files #190
Conversation
The babel config needs: "presets": [["@babel/preset-typescript", { "allExtensions": true }]], Personally, I don't think we should bother with |
Thanks @ef4. I made this change and made it a bit further. Here's the new error:
My guess is that the import of TemplateOnly is being stripped out as unused, but I'm not sure why or by what. |
Diagnosed this as emberjs/babel-plugin-ember-template-compilation#30. You can avoid the problem by configuring The next issue you'll hit after that is:
But that is because relative imports inside a v2 addon should have explicit file extensions (this is consistent with how node treats ES modules). So you need: -import AnotherGts from './another-gts';
+import AnotherGts from './another-gts.gts'; Note that we don't error on a missing Also note that: import TemplateOnly from './template-only'; is working because template-only components are automatically |
Stuff that needs fixing in the blueprint to close this issue:
|
- Adds a .gts component to typescript smoke test coverage
@ef4 I updated the config, added the .gts extension to the import, and verified that tests pass. I did a little research into the rollup |
This is an attempt to illustrate a problem I had doing a v1 -> v2 addon migration for an addon that includes .gts components.
The new test fails with the following output: