You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the case when using a regular HTML template (you can uncomment the given template in src/App.vue if you want to make sure). This compiles properly in build (yarn build), and should compile also properly in dev server ( yarn dev).
What is actually happening?
In dev server, the app crashes with a runtime error because it is not properly compiled:
Maybe this is only related with Vite (I use v4.0.4), but as the type assertion usage in templates is part of the official VueJS documentation, and as Vite is the officially recommended bundler, I think it is relevant to address the issue in VueJS project. If I'm wrong, I'll open the issue on Vite side.
Best regards
The text was updated successfully, but these errors were encountered:
Vue version
3.2.45
Link to minimal reproduction
https://github.com/qnp/vue3-pug-template-ts-assertion-bug
Steps to reproduce
yarn
thenyarn dev
What is expected?
As stated by the official documentation, type assertion in templates should be properly compiled.
This is the case when using a regular HTML template (you can uncomment the given template in src/App.vue if you want to make sure). This compiles properly in build (
yarn build
), and should compile also properly in dev server (yarn dev
).What is actually happening?
In dev server, the app crashes with a runtime error because it is not properly compiled:
System Info
Any additional comments?
Maybe this is only related with Vite (I use v4.0.4), but as the type assertion usage in templates is part of the official VueJS documentation, and as Vite is the officially recommended bundler, I think it is relevant to address the issue in VueJS project. If I'm wrong, I'll open the issue on Vite side.
Best regards
The text was updated successfully, but these errors were encountered: