fix(nuxi): include workspaceDir in tsconfig include (#7726)

This commit is contained in:
Daniel Roe 2022-09-22 14:50:40 +01:00 committed by GitHub
parent b877b14f81
commit 230af9c186
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -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), '**/*')] : []
] ]
}) })

View File

@ -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',