File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -268,7 +268,7 @@ export class ViteRuntimeClient {
268
268
debugTimer = setTimeout (
269
269
( ) =>
270
270
warn (
271
- `[vite-node ] module ${ fsPath } takes over 2s to load.\n${ getStack ( ) } ` ,
271
+ `[vite-runtime-client ] module ${ fsPath } takes over 2s to load.\n${ getStack ( ) } ` ,
272
272
) ,
273
273
2000 ,
274
274
)
@@ -367,12 +367,14 @@ export class ViteRuntimeClient {
367
367
return exports
368
368
}
369
369
370
- if ( transformed == null )
370
+ if ( transformed == null ) {
371
+ const importer = callstack [ callstack . length - 2 ]
371
372
throw new Error (
372
- `[vite-runtime-client] Failed to load "${ id } " imported from ${
373
- callstack [ callstack . length - 2 ]
373
+ `[vite-runtime-client] Failed to load "${ id } "${
374
+ importer ? `imported from ${ importer } ` : ''
374
375
} `,
375
376
)
377
+ }
376
378
377
379
const modulePath = cleanUrl ( moduleId )
378
380
// disambiguate the `<UNIT>:/` on windows: see nodejs/node#31710
Original file line number Diff line number Diff line change @@ -180,7 +180,10 @@ const builtins = new Set([
180
180
'wasi' ,
181
181
] )
182
182
183
+ const prefixedBuiltins = new Set ( [ 'node:test' ] )
184
+
183
185
export function isBuiltin ( id : string ) : boolean {
186
+ if ( prefixedBuiltins . has ( id ) ) return true
184
187
return builtins . has ( id . replace ( / ^ n o d e : / , '' ) )
185
188
}
186
189
You can’t perform that action at this time.
0 commit comments