-
-
Notifications
You must be signed in to change notification settings - Fork 500
Description
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
System:
OS: Windows 11 10.0.22631
CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor
Memory: 44.22 GB / 63.92 GB
Binaries:
Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.0.6 - ~\AppData\Local\pnpm\pnpm.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.22621.3527package.json dependencies
{
"dependencies": {
"vue": "^3.4.29"
},
"devDependencies": {
"@tsconfig/node20": "^20.1.4",
"@types/node": "^20.14.5",
"@vitejs/plugin-vue": "^5.0.5",
"@vue/language-plugin-pug": "^2.1.4",
"@vue/language-server": "^2.1.4",
"@vue/tsconfig": "^0.5.1",
"npm-run-all2": "^6.2.0",
"pug": "^3.0.3",
"typescript": "~5.4.0",
"vite": "^5.3.1",
"vue-tsc": "^2.1.4"
}
}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 there
In general, as an alternative to cloning the repo, this issue may be reproduced by:
- Getting your hands on a freshly-created Vue app (
pnpm create vue@latest) - Adding some type logic
- Creating a pug component that uses this type logic in its template
- Attempting typecheck with
pnpm type-check, notice the lack of compile time errors - Attempting to serve the app with
pnpm dev, notice the runtime errors in the browser console - Attempting to build the app with
pnpm build, notice the lack of compile time errors
What is expected?
- Typecheck should return errors from the
src/components/PugListUser.vuefile. Problematic code was deliberately left uncommented, with equivalent HTML code in thesrc/components/HtmlListUser.vuefile remaining commented. Uncommenting identical code in the HTML template fails as expected. - Serving the app with
pnpm devshould not report build errors in the console - Building the app with
pnpm buildshould not return type errors
What is actually happening?
- Typecheck does not return any errors whatsoever, as if the pug file does not exist
- Pug file actually does get one IDE error -- unexpected indent. This was fixed a while ago but appears to be regressing here.
- Build completes without failure, despite many failures existing within the build
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
"vueCompilerOptions": {
"plugins": [
"@vue/language-plugin-pug"
]
}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.