Closed
Description
Hello.
What I want to do
I want to better organize my codebase. So I began to introduce TypeScript Project References to help cope with performance problems in vscode and also separating tests from implementation thus it was not possible for the implementation files to import the test files. I was inspired by the official TypeScript Project References documentation on https://www.typescriptlang.org/docs/handbook/project-references.html#an-example-project.
What is my problem
However, I keep getting this TypeScript error in vscode and vue-tsc
vue/main.unit.ts:1:18 - error TS6307: File 'vue/main.vue.ts' is not listed within the file list of project 'vue/tsconfig.unit.json'. Projects must list all files or use an 'include' pattern.
The file is in the program because:
Imported via './main.vue' from file 'vue/main.unit.ts'
Imported via './main.vue' from file 'vue/main.vue.ts'
1 import Main from './main.vue';
~~~~~~~~~~~~
vue/main.vue.ts:42:45
42 let __VLS_internalComponent!: typeof import('./main.vue')['default'];
~~~~~~~~~~~~
File is included via import here.
Found 1 error.
What I expect to get
No errors in vscode, npm script build:vue is working the same way as build:ts
To reproduce
- Clone https://github.com/vidal7/volar-issue-project-references
- npm install
- npm run build:ts => works
- npm run build:vue => doesn't work
Details before reproducing
- build:ts is building a test files project that is referring to a implementation project that contains only a ts file and it works
- build:vue is building a tests files project that is referring to a implementation project that contains only a vue file and it doesn't work.
Is this a bug? Am I missing something?
Thank you.