Skip to content
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

Simplification of gjs and hbs handling in addon-dev #1558

Merged
merged 3 commits into from
Jul 26, 2023
Merged

Simplification of gjs and hbs handling in addon-dev #1558

merged 3 commits into from
Jul 26, 2023

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Jul 25, 2023

This simplified the resolution of gjs and hbs files in addon-dev. No custom resolveId is needed. The rules are:

  • publicEntrypoints are always expressed in terms of JS, and those automatically get mapped to their underlying gjs or template-only-component hbs as needed
  • relative imports within the addon should use explicit extensions (keeping in mind that a template-only-component is always a ".js" extension, even when the js is automatically generated)
  • the babel config should explicitly handle extensions .hbs and .gjs.

This should be released as breaking to document the need to adjust the babel extensions.

This simplified the resolution of gjs and hbs files in addon-dev. No custom resolveId is needed. The rules are:

 - publicEntrypoints are always expressed in terms of JS, and those automatically get mapped to their underlying gjs or template-only-component hbs as needed
 - relative imports within the addon should use explicit extensions (keeping in mind that a template-only-component is always a ".js" extension, even when the js is automatically generated)
  - the babel config should explicitly handle extensions .hbs and .gjs.

This should be released as breaking to document the need to adjust the babel extensions.
@ef4 ef4 added the breaking label Jul 25, 2023
@ef4 ef4 merged commit 17b7b60 into main Jul 26, 2023
196 checks passed
@ef4 ef4 deleted the gjs-updates branch July 26, 2023 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants