mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-20 08:15:59 +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) {
|
export function resolveModule (id: string, options?: ResolveModuleOptions) {
|
||||||
return resolveModulePath(id, {
|
return resolveModulePath(id, {
|
||||||
from: options?.url ?? options?.paths ?? [import.meta.url],
|
from: options?.url ?? options?.paths ?? [import.meta.url],
|
||||||
|
extensions: ['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts'],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user