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

🐛 BUG: Static build - Inline hoisted scripts relative paths are not working #2578

Closed
matthewp opened this issue Feb 14, 2022 · 0 comments · Fixed by #2581
Closed

🐛 BUG: Static build - Inline hoisted scripts relative paths are not working #2578

matthewp opened this issue Feb 14, 2022 · 0 comments · Fixed by #2581
Assignees

Comments

@matthewp
Copy link
Contributor

What version of astro are you using?

0.23.0-next.5

What package manager are you using?

npm

What operating system are you using?

Mac

Describe the Bug

Importing via a relative path in a hoisted script does not work, for example:

<script type="module" hoist>
  import "../scripts/foo.js";
</script>

This is related to use of query params for the module ids. We fix this for CSS and can probably do the same for hoisted scripts.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-zttdry-lduwsk?file=src%2Fpages%2Findex.astro&on=stackblitz

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 a pull request may close this issue.

1 participant