Skip to content

fix(scanner): duplicate modules for same id if glob is used in html-like types#16305

Merged
patak-cat merged 1 commit into
vitejs:mainfrom
sapphi-red:fix/scanner-duplicate-modules
Mar 29, 2024
Merged

fix(scanner): duplicate modules for same id if glob is used in html-like types#16305
patak-cat merged 1 commit into
vitejs:mainfrom
sapphi-red:fix/scanner-duplicate-modules

Conversation

@sapphi-red

@sapphi-red sapphi-red commented Mar 29, 2024

Copy link
Copy Markdown
Member

Description

When await happens in the scriptRE.exec(raw) loop, a different function might overwrite scriptRE.lastIndex causing duplicate modules to be loaded as a same id.

fixes #16211

@sapphi-red sapphi-red added p3-minor-bug An edge case that only affects very specific usage (priority) feat: deps optimizer Esbuild Dependencies Optimization labels Mar 29, 2024
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@patak-cat patak-cat enabled auto-merge (squash) March 29, 2024 08:43
@patak-cat patak-cat merged commit eca68fa into vitejs:main Mar 29, 2024
@sapphi-red sapphi-red deleted the fix/scanner-duplicate-modules branch March 29, 2024 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: deps optimizer Esbuild Dependencies Optimization p3-minor-bug An edge case that only affects very specific usage (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ambiguous import "..." has multiple matching exports

2 participants