Skip to content

Commit 3bf3a8a

Browse files
authored
fix: keep import.meta.url in bundled Vite (vitejs#20235)
1 parent ea9aed7 commit 3bf3a8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/rolldown.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ function buildTimeImportMetaUrlPlugin(): Plugin {
344344
for (const { t, ss, se } of imports) {
345345
if (t === 3 && code.slice(se, se + 4) === '.url') {
346346
// ignore import.meta.url with /** #__KEEP__ */ comment
347-
if (keepCommentRE.test(code.slice(0, se))) {
347+
if (keepCommentRE.test(code.slice(0, ss))) {
348348
keepCommentRE.lastIndex = 0
349349
continue
350350
}

0 commit comments

Comments
 (0)