mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-22 09:15:54 +00:00
fix(kit): provide default extensions in resolveModule
This commit is contained in:
parent
adfa1e699d
commit
d93029b911
@ -34,6 +34,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