Skip to content

Commit 655e147

Browse files
committed
fix(kit): mark resolvePath utils as sync
1 parent fe3dbfd commit 655e147

File tree

1 file changed

+5
-5
lines changed
  • packages/kit/src/internal

1 file changed

+5
-5
lines changed

packages/kit/src/internal/esm.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { pathToFileURL } from 'node:url'
2-
import { interopDefault, resolvePath } from 'mlly'
2+
import { interopDefault, resolvePathSync } from 'mlly'
33

44
export interface ResolveModuleOptions {
55
paths?: string | string[]
@@ -11,16 +11,16 @@ export interface ResolveModuleOptions {
1111
*
1212
* @internal
1313
*/
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) {
1515
try {
16-
return await resolvePath(id, { url })
16+
return resolvePathSync(id, { url })
1717
} catch {
1818
// intentionally empty as this is a `try-` function
1919
}
2020
}
2121

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] })
2424
}
2525

2626
export interface ImportModuleOptions extends ResolveModuleOptions {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy