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 option to disable template type-check and TS intellisense #577
Comments
We are using different language for the template (not HTML and not pug), would this fix the issue? |
@Antti this is a different issue, we should ignore template if it's not html or pug, you can open a bug report to track. |
Is this on the roadmap to be implemented any time soon? |
After marge #1009 this is easy to do. Now you can config this in tsconfig to do it. {
"compilerOptions": ...
"vueCompilerOptions": {
"experimentalDisableTemplateSupport": true
}
} Don't be surprised that when config this much intellisense in template will stop working. Only html intellisense is working. This option is for when you want to skip template type-checking in vue-tsc, or if volar memory usage is too high to your project. Disabling template TS support can reduce memory usage by more than half. (If enabled low power mode at the same time, the memory usage will be reduced to less then 1/4) |
Hi, I got this error after using that option I'm using 0.33.2 |
@ahnpnl thanks for the report! Could you try 0.33.2-patch.1? |
Thanks, the error doesn't exist anymore. I have a question about this option though, isn't it supposed to disable type checking on for HTML part of SFC? |
@ahnpnl yes |
I'm not sure this flag working. I still see it tries to check my HTML and throw TS error codes |
@ahnpnl it's works for me in https://github.com/johnsoncodehk/volar-starter, could you provide a minimal reproduction? |
@johnsoncodehk Is this the basic compilerOptions in tsconfig.json? Does this include a reference to packages/vue-typescript/src/typescriptRuntime.ts: const templateTsHost = options.compilerOptions.experimentalDisableTemplateSupport ? undefined : createTsLsHost('template'); Is this correct? const templateTsHost = vueHost.getVueCompilationSettings?.().experimentalDisableTemplateSupport ? undefined : createTsLsHost('template'); |
@yaegassy here
|
I have tried it in my environment and checked that only HTML Intellisense is now working. template type-check also be disabled? The ts error is still output. Perhaps I am misunderstanding the correct behavior of this feature. It might be a good idea to have @ahnpnl try again. |
it works on template project indeed. Thanks!! |
No description provided.
The text was updated successfully, but these errors were encountered: