mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
fix(nuxt): add exclude
paths to nitro tsconfig.server.json
(#22768)
This commit is contained in:
parent
815230c1b5
commit
427e64d175
@ -115,6 +115,11 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
|
|||||||
tsConfig: {
|
tsConfig: {
|
||||||
include: [
|
include: [
|
||||||
join(nuxt.options.buildDir, 'types/nitro-nuxt.d.ts')
|
join(nuxt.options.buildDir, 'types/nitro-nuxt.d.ts')
|
||||||
|
],
|
||||||
|
exclude: [
|
||||||
|
...nuxt.options.modulesDir.map(m => relativeWithDot(nuxt.options.buildDir, m)),
|
||||||
|
// nitro generate output: https://github.com/nuxt/nuxt/blob/main/packages/nuxt/src/core/nitro.ts#L186
|
||||||
|
relativeWithDot(nuxt.options.buildDir, resolve(nuxt.options.rootDir, 'dist'))
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -403,3 +408,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
|
|||||||
nuxt.hook('build:done', () => waitUntilCompile)
|
nuxt.hook('build:done', () => waitUntilCompile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function relativeWithDot (from: string, to: string) {
|
||||||
|
return relative(from, to).replace(/^([^.])/, './$1') || '.'
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user