mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-19 16:01:24 +00:00
fix(nuxt): provide default extensions in resolveTypePath
This commit is contained in:
parent
6fb5c9c151
commit
a0f9ddfe24
@ -8,6 +8,7 @@ export async function resolveTypePath (path: string, subpath: string, searchPath
|
||||
const r = resolveModulePath(path, {
|
||||
from: searchPaths?.map(d => directoryToURL(d)),
|
||||
conditions: ['types', 'import', 'require'],
|
||||
extensions: ['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts'],
|
||||
})
|
||||
if (subpath) {
|
||||
return r.replace(/(?:\.d)?\.[mc]?[jt]s$/, '')
|
||||
|
Loading…
Reference in New Issue
Block a user