Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(nuxi): include workspaceDir in tsconfig include (#7726)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Sep 22, 2022
1 parent b877b14 commit 230af9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/nuxi/src/utils/prepare.ts
Expand Up @@ -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), '**/*')] : []
]
})

Expand Down
3 changes: 3 additions & 0 deletions test/fixtures/basic/nuxt.config.ts
Expand Up @@ -53,6 +53,9 @@ export default defineNuxtConfig({
}
],
hooks: {
'prepare:types' ({ tsConfig }) {
tsConfig.include = tsConfig.include.filter(i => i !== '../../../../**/*')
},
'modules:done' () {
addComponent({
name: 'CustomComponent',
Expand Down

0 comments on commit 230af9c

Please sign in to comment.