Repository navigation
feat(image): support images imported with import attributes in Rollup 5 - #2052
Merged
Merged
Conversation
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no actionable issues remain. Reviews (9) · Last reviewed commit: "Merge branch 'master' into feat/rollup-5..." · Reviewed by Greptile |
3 of 9 tasks
TrickyPi
force-pushed
the
feat/rollup-5/image
branch
2 times, most recently
from
November 28, 2026 08:53
ff90310 to
a9be05d
Compare
3 of 9 tasks
Rollup 5 appends an encoded attributes suffix to the id of a module imported with attributes, so the extension lookup found no MIME type, the image was never loaded, and the include/exclude patterns stopped matching. The load hook now uses the `rawId` it receives for the extension lookup, `addWatchFile` and `readFileSync`. The include/exclude filter keeps the composite id, because `@rollup/pluginutils` ^5.6.0 strips the attribute suffix before matching. The test bundles a module that imports an SVG with attributes and asserts that the image is inlined as a data URI; it is skipped below Rollup 5.
lukastaegert
force-pushed
the
feat/rollup-5/image
branch
from
December 3, 2026 16:15
a9be05d to
cafb937
Compare
lukastaegert
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rollup Plugin Name:
imageThis PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
In Rollup 5, import attributes are appended to
idas a query string, with the original ID passed viarawId. UseloadOptions.rawId(falling back toid) inloadso images imported with import attributes are matched and read properly.