mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-19 16:01:24 +00:00
fix(kit): provide default extensions in resolveModule
This commit is contained in:
parent
a8856de591
commit
6fb5c9c151
@ -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'],
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user