mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(nuxi): include workspaceDir
in tsconfig include (#7726)
This commit is contained in:
parent
b877b14f81
commit
230af9c186
@ -27,7 +27,8 @@ export const writeTypes = async (nuxt: Nuxt) => {
|
|||||||
include: [
|
include: [
|
||||||
'./nuxt.d.ts',
|
'./nuxt.d.ts',
|
||||||
join(relative(nuxt.options.buildDir, nuxt.options.rootDir), '**/*'),
|
join(relative(nuxt.options.buildDir, nuxt.options.rootDir), '**/*'),
|
||||||
...nuxt.options.srcDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.srcDir), '**/*')] : []
|
...nuxt.options.srcDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.srcDir), '**/*')] : [],
|
||||||
|
...nuxt.options.workspaceDir !== nuxt.options.rootDir ? [join(relative(nuxt.options.buildDir, nuxt.options.workspaceDir), '**/*')] : []
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
3
test/fixtures/basic/nuxt.config.ts
vendored
3
test/fixtures/basic/nuxt.config.ts
vendored
@ -53,6 +53,9 @@ export default defineNuxtConfig({
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
hooks: {
|
hooks: {
|
||||||
|
'prepare:types' ({ tsConfig }) {
|
||||||
|
tsConfig.include = tsConfig.include.filter(i => i !== '../../../../**/*')
|
||||||
|
},
|
||||||
'modules:done' () {
|
'modules:done' () {
|
||||||
addComponent({
|
addComponent({
|
||||||
name: 'CustomComponent',
|
name: 'CustomComponent',
|
||||||
|
Loading…
Reference in New Issue
Block a user