unplugin / unplugin-turbo-console

🚀 Improve the Developer Experience of console
https://utc.yuy1n.io
MIT License
527 stars 12 forks source link

使用装饰器模式开发,报错: "decorators", "decorators-legacy". #34

Closed pyt111 closed 5 months ago

pyt111 commented 5 months ago

Describe the bug

[plugin:unplugin-turbo-console] This experimental syntax requires enabling one of the following parser plugin(s): "decorators", "decorators-legacy". (18:0) image

image

Reproduction

https://stackblitz.com/edit/vitejs-vite-s1mfjm?file=src%2Fcomponents%2FHelloWorld.vue

System Info

System:
    OS: macOS 14.4.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 31.55 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.7.0 - /usr/local/bin/npm
    pnpm: 9.3.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 126.0.6478.62
    Safari: 17.4.1
  npmPackages:
    @vitejs/plugin-vue: ^5.0.4 => 5.0.5 
    typescript: ^5.2.2 => 5.4.5 
    unplugin-turbo-console: ^1.8.6 => 1.8.6 
    vite: ^5.2.0 => 5.3.1 
    vue: ^3.4.21 => 3.4.29 
    vue-facing-decorator: ^3.0.4 => 3.0.4 
    vue-tsc: ^2.0.6 => 2.0.21

Used Package Manager

pnpm

Validations

stackblitz[bot] commented 5 months ago

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

yuyinws commented 5 months ago

It seems a bug from vue-facing-decorator. I get the same error when remove unplugin-turbo-console.

image image
pyt111 commented 5 months ago

It seems a bug from vue-facing-decorator. I get the same error when remove unplugin-turbo-console.

image image

关掉 unplugin-turbo-console后,是vue/compiler-sfc报错了,这个案例中没有配置 看这个新的案例: (https://stackblitz.com/~/github.com/pyt111/my-vue-test-decorators)

yuyinws commented 5 months ago

那就说明这个错误与unplugin-turbo-console无关,似乎应该提给vue-facing-decorator

pyt111 commented 5 months ago

那就说明这个错误与unplugin-turbo-console无关,似乎应该提给vue-facing-decorator

卸载vue-facing-decorator 使用vue-class-component,同样会有问题。只要使用装饰器就会抛出错误