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 relative import path of assets for non-entrypoint modules #1600

Merged
merged 1 commit into from
Sep 24, 2023

Conversation

simonihmig
Copy link
Collaborator

@simonihmig simonihmig commented Sep 13, 2023

When modules reference static assets added to the build via the keepAssets rollup plugin, and those modules are not entrypoints and as such moved into a bundle at a different location, the relative path to that asset would not get rewritten, leading to broken references.

Fixes embroider-build/addon-blueprint#192

Successfully tested in a local project. We don't have unit tests for rollup plugins here. And I haven't found scenarios that implicitly test the behavior of keepAssets, but maybe I missed that. Do we have an easy way to add tests, or is this good as-is?

When modules reference static assets added to the build via the `keepAssets` rollup plugin, and those modules are not entrypoints and as such moved into a bundle at a different location, the relative path to that asset would not get rewritten, leading to broken references.

Fixes embroider-build/addon-blueprint#192
@simonihmig simonihmig added the bug Something isn't working label Sep 13, 2023
@simonihmig simonihmig requested a review from ef4 September 15, 2023 18:19
@simonihmig simonihmig merged commit fe69a74 into main Sep 24, 2023
196 checks passed
@simonihmig simonihmig deleted the fix-keep-assets-relative-path branch September 24, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rollup breaks CSS imports for non-entrypoint modules
2 participants