Can't use TS decorators with Vite + TS quasar project #16414
Labels
area/typescript
bug/1-repro-available
A reproduction is available and needs to be confirmed.
flavour/quasar-cli-vite
kind/bug 🐞
Qv2 🔝
Quasar v2 issues
What happened?
I'm trying to use a custom decorator inside a
<script lang="ts">
block, but I'm getting this error:I understand that this error is referring to needing a babel plugin like @babel/plugin-proposal-decorators, but even after adding that plugin the decorator does not work. Additionally, I do not need that plugin to be able to use custom decorators inside a
<script lang="ts">
block in regular vite + TS apps without quasar so I'm not sure why it should be required here.What did you expect to happen?
I already have
"experimentalDecorators": true
in my tsconfig, so I would expect that decorators should work fine in TS contexts within a quasar app.Reproduction URL
https://stackblitz.com/edit/stackblitz-starters-e5apuw?file=src%2FApp.vue
How to reproduce?
"experimentalDecorators": true
in the tsconfig, and the decorators plugin is being added inquasar.config.js
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
TypeScript Support
Platforms/Browsers
Chrome
Quasar info output
Relevant log output
Additional context
My local reproduction of the issue was created using the following
npm init quasar
options:And then I installed
vue-facing-decorator
:And then I updated the
script
block insrc/App.vue
to:The text was updated successfully, but these errors were encountered: