-
-
Notifications
You must be signed in to change notification settings - Fork 527
Description
I have this simple project in vscode with Vue Language Features (Volar) enabled and TypeScript and JavaScript Language Features disabled (takeover mode).
.
├── a.ts
├── b.ts
└── tsconfig.json
Both a.ts and b.ts have a simple const a = import.meta line of code.
My tsconfig.json
{
"files": ["a.ts"],
"compilerOptions": {
"module": "CommonJS"
}
}My question is...
Why am I getting a The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'. error in both files? Why is b.ts not excluded?
If I disable Volar and re-enable vscode built-in TypeScript and JavaScript Language Features I only get the error in a.ts file, just as I'd expect.
I understand that this setup does not really makes sense on a typescript project with no .vue files. But the thing is that I am running into this behaviour within a nuxt project where all IDE setup recommendations point to the use of Volar Takeover Mode.
From vue docs:
"Volar provides a feature called "Takeover Mode" to improve performance. In takeover mode, Volar provides support for both Vue and TS files using a single TS language service instance."
Any help or clarification will be very helpful!
Thanks in advanced!