Skip to content

fix: ensure deterministic and valid namespace import identifiers across files#180

Merged
sxzz merged 1 commit intosxzz:mainfrom
Jungzl:fix/fake
Feb 3, 2026
Merged

fix: ensure deterministic and valid namespace import identifiers across files#180
sxzz merged 1 commit intosxzz:mainfrom
Jungzl:fix/fake

Conversation

@Jungzl
Copy link
Copy Markdown
Contributor

@Jungzl Jungzl commented Feb 2, 2026

  • This PR contains AI-generated code, but I have carefully reviewed it myself. Otherwise, my PR may be closed.
    • I understand that my PR is more likely to be rejected or requested for changes if it contains AI-generated code that I do not fully understand.

Description

I recently noticed that my personal Vue lib output changes per build even if there's no code changes which broke the build cache.

I found that some shared-chunks' hash changed every time due to the import namespace identifier index.

import * as vue408 from "vue";
///            ^^^not consistent across multiple builds

So I moved the identifierMap into transform hook and reduced unnecessary namespace conversions to make sure that the namespace import index keeping stable per file.

Linked Issues

Additional context

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Feb 2, 2026

Open in StackBlitz

npm i https://pkg.pr.new/rolldown-plugin-dts@180

commit: a9a589e

@sxzz sxzz merged commit a123b83 into sxzz:main Feb 3, 2026
13 checks passed
@Jungzl Jungzl deleted the fix/fake branch February 4, 2026 00:11
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.

2 participants