fix(kit): provide default extensions in resolveModule

This commit is contained in:
Daniel Roe 2025-03-02 21:14:26 +00:00
parent a8856de591
commit 6fb5c9c151
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -33,6 +33,7 @@ export function tryResolveModule (id: string, url: string | string[] | URL | URL
export function resolveModule (id: string, options?: ResolveModuleOptions) {
return resolveModulePath(id, {
from: options?.url ?? options?.paths ?? [import.meta.url],
extensions: ['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts'],
})
}