-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
Pug template type checking seems to be broken despite consistent tooling setup #4774
Comments
The fix of vuejs/core@6345197 does not affect language tools, and this problem has never been fixed in language tools, so the editor reports |
Thank you for your quick reply. When I tested it without the indent, there was no error reported from the template, but the type inference was still not present. Does this also affect the type checking? |
You need to set |
That seems to have fixed the problem. Thank you so much! |
I know this is already closed, but, I'n my vsCode I'm not able to make it work. My template "pug" files are not recognizing HTML tag or elements neither TailwindCSS classes...When I change that back to "html" then yes. |
Vue - Official extension or vue-tsc version
2.1.4 (VSCode extension, vue-tsc, AND @vue/language-plugin-pug)
VSCode version
1.92.2
Vue version
3.4.29
TypeScript version
5.4.0
System Info
package.json dependencies
Steps to reproduce
I have a reproduction repo here with additional steps: https://github.com/Threebow/vue-tsc-pug-repro
This reproduction repo is very simple and is thoroughly commented, start at
src/App.vue
and go from thereIn general, as an alternative to cloning the repo, this issue may be reproduced by:
pnpm create vue@latest
)pnpm type-check
, notice the lack of compile time errorspnpm dev
, notice the runtime errors in the browser consolepnpm build
, notice the lack of compile time errorsWhat is expected?
src/components/PugListUser.vue
file. Problematic code was deliberately left uncommented, with equivalent HTML code in thesrc/components/HtmlListUser.vue
file remaining commented. Uncommenting identical code in the HTML template fails as expected.pnpm dev
should not report build errors in the consolepnpm build
should not return type errorsWhat is actually happening?
Link to minimal reproduction
https://github.com/Threebow/vue-tsc-pug-repro
Any additional comments?
Been working with Pug+Vue for a while with varying degrees of consistency.
Note that tsconfig.json has the correct
And all tools versions are matching. Using VSCode with the matching official plugin version as well. All are on the v2.1.4 release that came out a few hours ago, and this can be confirmed by looking at the
package.json
within the reproduction repository.Please let me know if there is any further information I can provide.
The text was updated successfully, but these errors were encountered: