vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.74k stars 592 forks source link

The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.Vetur(1343) #3708

Open UUmaGii opened 1 year ago

UUmaGii commented 1 year ago

Info

Problem

i use "npm init vue@latest" init a vue project,this project has config esnext in tsconfig , but still has an alarm

The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node16', or 'nodenext'.Vetur(1343)

this is my code image

The above code can run normally, it seems like that vetur can't identify this grammar, but I hope Vetur doesn't give an alarm prompt

UUmaGii commented 1 year ago

this is vue project default-tsconfig.node.json { "extends": "@tsconfig/node18/tsconfig.json", "include": ["vite.config.", "vitest.config.", "cypress.config.", "playwright.config."], "compilerOptions": { "composite": true, "module": "esnext", "types": ["node"] } }

busyhe commented 1 month ago

VSCode select Typescript Version to Workspace version

UUmaGii commented 1 month ago

这是来自QQ邮箱的假期自动回复邮件。 您好,你的邮件已经送达,我看到后会尽快回复。