We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation .
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
Compilation fails when using TypeScript syntax in Vue <template> :
<template>
< script setup lang = " ts " > let x : string | number = 1 </ script > < template > {{ (x as number). toFixed ( 2 ) }} </ template >
Default config
{ "scripts" : { "build" : " parcel build index.html " }, "devDependencies" : { "@parcel/transformer-vue" : " 2.12.0 " , "parcel" : " ^2.12.0 " }, "dependencies" : { "vue" : " ^3.4.21 " } }
No error.
@parcel/transformer-js: Expected ',', got 'as' /parcel-vue/src/App.vue:6:8 5 | <template> > 6 | {{ (x as number).toFixed(2) }} > | ^ 7 | </template> 8 |
When lang="ts" is specified for the <script> , <template> should be processed using TypeScript too.
lang="ts"
<script>
https://github.com/Demivan/parcel-vue/tree/typescript-template
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.