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

Support ESM imports for scripts #563

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Conversation

cschmatzler
Copy link
Contributor

We are using unbundled JavaScript without a build process, using ESM-style imports in the process. This requires the script tag to have type="module" added.

This PR adds a new configuration option, js_script_type, that defaults to text/javascript - which was the previous default. In our case, we can set it to module to support our scripts.
In addition, in Storybook's case, Storybook's own assets need to be loaded after, so I added the defer tag.

Signed-off-by: Christoph Schmatzler <[email protected]>
@cblavier
Copy link
Contributor

thank you, I didn't even know about <script type="module"/>

@cblavier cblavier merged commit ef3e480 into phenixdigital:main Jan 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants