File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,7 @@ function buildTimeImportMetaUrlPlugin(): Plugin {
351
351
for ( const { t, ss, se } of imports ) {
352
352
if ( t === 3 && code . slice ( se , se + 4 ) === '.url' ) {
353
353
// ignore import.meta.url with /** #__KEEP__ */ comment
354
- if ( keepCommentRE . test ( code . slice ( 0 , se ) ) ) {
354
+ if ( keepCommentRE . test ( code . slice ( 0 , ss ) ) ) {
355
355
keepCommentRE . lastIndex = 0
356
356
continue
357
357
}
Original file line number Diff line number Diff line change @@ -295,7 +295,9 @@ export function oxcPlugin(config: ResolvedConfig): Plugin {
295
295
jsxRefreshInclude,
296
296
jsxRefreshExclude,
297
297
isServerConsumer : environment . config . consumer === 'server' ,
298
- runtimeResolveBase : normalizePath ( url . fileURLToPath ( import . meta. url ) ) ,
298
+ runtimeResolveBase : normalizePath (
299
+ url . fileURLToPath ( /** #__KEEP__ */ import . meta. url ) ,
300
+ ) ,
299
301
jsxInject,
300
302
transformOptions,
301
303
} )
@@ -344,7 +346,9 @@ export function oxcPlugin(config: ResolvedConfig): Plugin {
344
346
345
347
return result
346
348
}
347
- const runtimeResolveBase = normalizePath ( url . fileURLToPath ( import . meta. url ) )
349
+ const runtimeResolveBase = normalizePath (
350
+ url . fileURLToPath ( /** #__KEEP__ */ import . meta. url ) ,
351
+ )
348
352
349
353
let server : ViteDevServer
350
354
@@ -526,7 +530,7 @@ async function generateRuntimeHelpers(
526
530
runtimeHelpers : readonly [ string , string ] [ ] ,
527
531
) : Promise < string > {
528
532
const bundle = await rolldown ( {
529
- cwd : url . fileURLToPath ( import . meta. url ) ,
533
+ cwd : url . fileURLToPath ( /** #__KEEP__ */ import . meta. url ) ,
530
534
input : 'entrypoint' ,
531
535
platform : 'neutral' ,
532
536
logLevel : 'silent' ,
You can’t perform that action at this time.
0 commit comments