mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +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: [
|
||||
'./nuxt.d.ts',
|
||||
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: {
|
||||
'prepare:types' ({ tsConfig }) {
|
||||
tsConfig.include = tsConfig.include.filter(i => i !== '../../../../**/*')
|
||||
},
|
||||
'modules:done' () {
|
||||
addComponent({
|
||||
name: 'CustomComponent',
|
||||
|
Loading…
Reference in New Issue
Block a user