File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -899,21 +899,23 @@ async function loadSupportObject(modulePath, supportObjectName) {
899899
900900 let obj
901901 try {
902- obj = await import ( importPath )
902+ const resolvedImportPath =
903+ isWindows ( ) && typeof importPath === 'string' && path . isAbsolute ( importPath )
904+ ? pathToFileURL ( importPath ) . href
905+ : importPath
906+
907+ obj = await import ( resolvedImportPath )
903908 } catch ( importError ) {
904- // Fix error stack to point to original .ts files
905909 if ( fileMapping ) {
906910 fixErrorStack ( importError , fileMapping )
907911 }
908912
909- // Clean up temp files if created before rethrowing
910913 if ( tempJsFile ) {
911914 const filesToClean = Array . isArray ( tempJsFile ) ? tempJsFile : [ tempJsFile ]
912915 cleanupTempFiles ( filesToClean )
913916 }
914917 throw importError
915918 } finally {
916- // Clean up temp files if created
917919 if ( tempJsFile ) {
918920 const filesToClean = Array . isArray ( tempJsFile ) ? tempJsFile : [ tempJsFile ]
919921 cleanupTempFiles ( filesToClean )
You can’t perform that action at this time.
0 commit comments