New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "jsx": "preserve"
in jsconfig.json for vue3 javascript project
#7113
Comments
using this code add your jsconfig.json file. this code solve my problem "vueCompilerOptions": { |
@Naveenkumar153 Yes, I know. That's the reason why I suggested we should add this option in template by default if when creating a vue3 project. |
For TypeScript projects, adding:
in tsconfig.json solves the problem. |
I only add line below to my compilerOptions part in tsconfig.json to solve the problem, but yes as the author said, it'll be nice to implement it directly:
|
Agree.
|
This issue is important because otherwise the Vue 3 project arrives "incomplete" for VS Code users (which I would suspect is the majority) and requires additional configuration to get up and running properly. It seems like it should be a relatively small change to implement. |
But what does the setting actually do other, what's the technical explanation behind it? |
All I know is that it enables type checking in SFC templates. See vuejs/language-tools#1153. For more details ask the author johnsoncodehk. |
What 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:If you do nothing with it or just set
vueCompilerOptions.experimentalDisableTemplateSupport
injsconfig.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"
tojsconfig.json
by defualt when user create a vue3 javascript project.The text was updated successfully, but these errors were encountered: