Repository navigation
feat(virtual): support virtual modules imported with import attributes in Rollup 5 - #2054
Merged
Merged
Conversation
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no actionable defects were found. Reviews (8) · Last reviewed commit: "feat(virtual): support virtual modules i..." · Reviewed by Greptile |
3 of 9 tasks
TrickyPi
force-pushed
the
feat/rollup-5/virtual
branch
2 times, most recently
from
November 28, 2026 08:53
efb854f to
d77bac6
Compare
3 of 9 tasks
lukastaegert
force-pushed
the
feat/rollup-5/virtual
branch
from
December 3, 2026 16:23
d77bac6 to
51c8d79
Compare
…s in Rollup 5 Rollup 5 appends an encoded attributes suffix to the id of a module that is imported with attributes, so `load` no longer matched the id of the virtual module and the bundle failed with a missing module. The load hook now looks the module up through the `rawId` it receives. Relative imports inside virtual modules needed no change: Rollup also passes `importerRawId` to `resolveId`, but the encoded suffix contains no path separator, so the directory derived from the composite importer is the same. The type test compiles against rollup 5's declarations, which reference `Buffer` next to `Symbol.asyncDispose`, so it now includes the node types the repository root already provides. The bundle test imports virtual modules with attributes and is skipped below Rollup 5. # Conflicts: # pnpm-lock.yaml
lukastaegert
force-pushed
the
feat/rollup-5/virtual
branch
from
December 4, 2026 12:42
51c8d79 to
299abc0
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:
virtualThis PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
In Rollup 5, import attributes are appended to module IDs as a query string, with the original IDs passed via
importerRawIdandrawId. UseresolveOptions.importerRawIdinresolveIdandloadOptions.rawIdinload(falling back toimporter/id).