Add `"jsx": "preserve"` in jsconfig.json for vue3 javascript project
See original GitHub issueWhat problem does this feature solve?
I use vscode and volar, when I create a new vue project, I find a warning from <template>
tag by valor:
TypeScript intellisense is disabled on template, you can config `"jsx": "preserve"` in tsconfig or jsconfig to enable it, or config `vueCompilerOptions.experimentalDisableTemplateSupport` to disable this prompt.
If you do nothing with it or just set vueCompilerOptions.experimentalDisableTemplateSupport
in jsconfig.json
, you will find that your intelligent completion won’t work anymore in template part. So I add "jsx": "preserve"
, and everything is fun again.
What does the proposed API look like?
Add "jsx": "preserve"
to jsconfig.json
by defualt when user create a vue3 javascript project.
Issue Analytics
- State:
- Created a year ago
- Reactions:7
- Comments:8
Top Results From Across the Web
Use jsconfig.json to improve VS Code IntelliSense on a Vue.js ...
It can be done by adding a jsconfig.json file in your project. In this file you will specify a mapping table to link...
Read more >Enabling JSX Support in Vue after deliberately not supporting ...
We can solve this issue by adding the following code in our jsconfig.json : { "compilerOptions": { "jsx": "preserve" } }.
Read more >Setup | Vetur - GitHub Pages
# Project Setup · package.json must exist in the project root, Vetur uses it to determine the installed Vue version. · Next, create...
Read more >Vetur error with finding tsconfig.json or jsconfig.json-Vue.js
... "module": "esnext", // this enables stricter inference for data properties on `this` "strict": true, "jsx": "preserve", "moduleResolution": "node" } }.
Read more >Configuration Reference | Vue CLI
vue.config.js is an optional config file that will be automatically loaded ... if it's present in your project root (next to package.json )....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
using this code add your jsconfig.json file. this code solve my problem
“vueCompilerOptions”: { “experimentalDisableTemplateSupport”: true, “jsx”: “preserve” }
All I know is that it enables type checking in SFC templates. See https://github.com/johnsoncodehk/volar/issues/1153.
For more details ask the author johnsoncodehk.