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

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

Merged
merged 5 commits into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/nuxi/src/utils/prepare.ts
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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