File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/kit/src/internal Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
import { pathToFileURL } from 'node:url'
2
- import { interopDefault , resolvePath } from 'mlly'
2
+ import { interopDefault , resolvePathSync } from 'mlly'
3
3
4
4
export interface ResolveModuleOptions {
5
5
paths ?: string | string [ ]
@@ -11,16 +11,16 @@ export interface ResolveModuleOptions {
11
11
*
12
12
* @internal
13
13
*/
14
- export async function tryResolveModule ( id : string , url : string | string [ ] = import . meta. url ) {
14
+ export function tryResolveModule ( id : string , url : string | string [ ] = import . meta. url ) {
15
15
try {
16
- return await resolvePath ( id , { url } )
16
+ return resolvePathSync ( id , { url } )
17
17
} catch {
18
18
// intentionally empty as this is a `try-` function
19
19
}
20
20
}
21
21
22
- export async function resolveModule ( id : string , options ?: ResolveModuleOptions ) {
23
- return await resolvePath ( id , { url : options ?. paths ?? [ import . meta. url ] } )
22
+ export function resolveModule ( id : string , options ?: ResolveModuleOptions ) {
23
+ return resolvePathSync ( id , { url : options ?. paths ?? [ import . meta. url ] } )
24
24
}
25
25
26
26
export interface ImportModuleOptions extends ResolveModuleOptions {
You can’t perform that action at this time.
0 commit comments