Answer the question
In order to leave comments, you need to log in
Why don't you like the syntax?
Guys, hello.
Tell me what is the joke of the error, it seems everything is like in the docks
/~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/pages/CartPage.vue
Module build failed: SyntaxError: C:/OpenServer/domains/pizzaStore/src/pages/CartPage.vue: Unexpected token (36:8)
34 | export default {
35 | computed: {
> 36 | ...mapGetters ({
| ^
37 | products: 'cartProducts',
38 | checkoutStatus: 'checkoutStatus'
39 | }),
@ ./src/pages/CartPage.vue 7:2-105
@ ./src/router.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
Answer the question
In order to leave comments, you need to log in
decided by myself... you need to install this little thing
babeljs.io/docs/plugins/transform-object-rest-spread
The curly brace seems to be missing:
computed: {
...mapGetters ({
products: 'cartProducts',
checkoutStatus: 'checkoutStatus'
})
},
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question