Local package (module) dependencies tracking in monorepo (npm workspaces) broken in latest version (v2.0.7)
When I make the following change:
// api/index.ts outside "vue project"
// (sub module in my monorepo, project structure is described later)
export type theType = number // from this
export type theType = string // to this, and ctrl+S.
The error in following file won't be detected before restarting Vscode (or extension host):
<script setup lang="ts">
import type { theType } from "api"
cost num: theType = 1 // won't complain any error before reload.
This problem only exist in (v2.0.7). It works normally in (v2.0.6) (I've downgraded to this).
Project structure:
root
- api
- index.ts
- index.js
- index.d.ts
- package.json
- fe
- src
- App.vue
- ...
- pacakge.json
// root/api/package.json:
{
"name": "api",
"types": "index.d.ts",
"devDependencies": {
"typescript": "^5.4.3"
},
"scripts": {
"build": "tsc index.ts -d",
"dev": "tsc index.ts -d -w"
}
}
// root/package.json
{
"name": "homework",
"scripts": {},
"workspaces": [
"be",
"fe",
"api"
]
}
dev command:
(root) $ npm run dev -w api
package.json and tsconfig.json inside fe are all Vue defualt boilerplates, reamain untouched.
Done editing. (Hope this will triggle some notification)
Hey there, as there have been many fixes in the last 2.x versions: Please let us know if you're still encountering this issue. Otherwise kindly close this one, thanks!
@davidmatter
@LifeJustDLC The issue you reported seems kind of unusual. Please provide a minimal reproduction project and re-open this issue. Thanks!
@bosens-China This seems to be another issue. Please check your tsconfig.json, and open a new issue if there are still unexpected behaviors. Thanks!