Skip to content
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

@vue/babel-preset-app 添加veui后,decorator语法糖报错 #467

Closed
yacan8 opened this issue Jun 10, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@yacan8
Copy link

commented Jun 10, 2019

版本

    "babel-plugin-lodash": "^3.3.4",
    "babel-plugin-veui": "^1.0.0-alpha.26",
    "babel-preset-veui": "^1.0.0-alpha.26",
    "veui-loader": "^1.0.0-alpha.26",
    "veui-theme-one": "^1.0.0-alpha.26",
    "vue": "^2.6.10",

    "@vue/cli-plugin-babel": "^3.8.0",
    "@vue/cli-service": "^3.8.0",

报错:

in ./src/App.vue?vue&type=script&lang=js&

Module parse failed: Unexpected character '@' (3:10)
You may need an appropriate loader to handle this file type.
| import Button from "veui/components/Button.vue";
| import { Vue, Component } from 'vue-property-decorator';
> let App = @Component({
|   components: {
|     Button

 @ ./src/App.vue?vue&type=script&lang=js& 1:0-347 1:363-366 1:368-712 1:368-712
 @ ./src/App.vue
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://172.18.24.75:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

demo仓库:https://github.com/yacan8/veui-demo

@yacan8 yacan8 changed the title @vue/babel-preset-cli 添加veui后,decorator语法糖报错 @vue/babel-preset-app 添加veui后,decorator语法糖报错 Jun 12, 2019

sodatea added a commit to sodatea/veui that referenced this issue Jun 12, 2019

fix: replace stop() with skip() so that other plugins won't break
fixes ecomfe#467

`path.skip()` skips traversing the children of the current path.
`path.stop()` stops traversal entirely.

So by using `stop()`, it may stop execution of other babel plugins on
this file. In this case, it's `proposal-decorators` that failed to run.

Justineo added a commit that referenced this issue Jun 12, 2019

fix: replace stop() with skip() so that other plugins won't break
fixes #467

`path.skip()` skips traversing the children of the current path.
`path.stop()` stops traversal entirely.

So by using `stop()`, it may stop execution of other babel plugins on
this file. In this case, it's `proposal-decorators` that failed to run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.