File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import type { IpcRequestContext } from '../ipcTypes';
3
3
import { getPrefixForLibraryLoad } from './utils/getPrefixForLibraryLoad' ;
4
4
import { getSystemGlobalLibraryPath } from './utils/getSystemGlobalLibraryPath' ;
5
5
import { isNodeExceptionCode } from './utils/isNodeExceptionCode' ;
6
+ import { pathToFileURL } from 'url'
6
7
7
8
interface BaseLoadResult < T > {
8
9
result : Promise < UnwrapDefault < T > > ;
@@ -35,7 +36,7 @@ const unwrapDefaultExport = <T>(module: T): UnwrapDefault<T> => {
35
36
} ;
36
37
37
38
const importDefaultExport = async < T > ( path : string ) => {
38
- const result = ( await import ( path ) ) as T ;
39
+ const result = ( await import ( pathToFileURL ( path ) . href ) ) as T ;
39
40
return unwrapDefaultExport ( result ) ;
40
41
} ;
41
42
You can’t perform that action at this time.
0 commit comments