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

Fix domain sharding for ESM output #292

Merged
merged 4 commits into from
Dec 19, 2024
Merged

Fix domain sharding for ESM output #292

merged 4 commits into from
Dec 19, 2024

Conversation

benjervis
Copy link
Contributor

Seems there was another code path I was not aware of that can generate URLs that needs to be sharded.

When outputting to ESM, the runtime imports esm-js-loader and calls its load function with the public ID we're after.

To avoid things becoming entirely too messy, I've created a new esm-js-loader-shards that will call the sharding helper on the URL generated, before passing it to import.

Adding a test for this required updating the run integration test helper so that it could handle sharded domains (because it was trying to request assets from integration/dist-4/a.hash.js).

@benjervis benjervis merged commit 878d5a6 into main Dec 19, 2024
17 checks passed
@benjervis benjervis deleted the fix-sharding-for-esm branch December 19, 2024 01:45
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.

3 participants