Skip to content

This experimental syntax requires enabling one of the following parser plugin(s): 'decorators-legacy, decorators' #5866

New issue

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

Closed
PachVerb opened this issue Sep 10, 2020 · 0 comments · Fixed by #5868

Comments

@PachVerb
Copy link

Version

4.5.4

Environment info

 System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
  Binaries:
    Node: 12.14.1 - /usr/local/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.13.4 - /usr/local/bin/npm
  Browsers:
    Chrome: 85.0.4183.102
    Edge: Not Found
    Firefox: 80.0
    Safari: 13.1
  npmGlobalPackages:
    @vue/cli: 4.5.4

Steps to reproduce

vue cli 初始化项目,手动预选插件及其他设置

初始化完成,说明:整个项目是由ts 构建 外加eslint代码质量检查。

运行项目 npm dev, commland line 提示错误 无法解释ts装饰器。浏览器访问初始化的demo,切换路由,路由无法正确加加载渲染

What is expected?

能够使用装饰器语法,

What is actually happening?

缺少loader,编译ts装饰器语法。

haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this issue Sep 10, 2020
These are enabled by default in the `@vue/babel-preset-app`.

Fixes vuejs#5863
Fixes vuejs#5866

These doesn't fix the case where user has enabled more custom syntax in
babel. `@vue/compiler-sfc` needs to fail gracefully in such cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant