강의

멘토링

커뮤니티

Inflearn Community Q&A

admin0024's profile image
admin0024

asked

Vue.js Intermediate Course - Learn Vue.js, ES6, Vuex by Building a Web App

Introduction to mapMutations, mapActions and the flexible syntax of helpers

안녕하세요 질문드립니다.

Written on

·

239

1

<script>
import {
    mapMutations
from 'vuex'
export default {
    data() {
        return {}
    },
    methods: {
        ...mapMutations({
            asideToggle: 'aside'
        })
    }
}
이런식으로 똑같이 사용했는데
Module build failed: SyntaxError: C:/dripactory/src/components/TodoHeader.vue: Unexpected token (34:8) 32 | }, 33 | methods: { > 34 | ...mapMutations([ | ^ 35 | 'asideToggle' 36 | ]) 37 | }
계속 이런 에러가뜹니다.. 완전똑같이헀는데 이유가 뭘까요
es6vuejsvuexjavascript

Answer 2

0

admin님의 프로필 이미지
admin
Questioner

네네

0

captain님의 프로필 이미지
captain
Instructor

안녕하세요, 아마 `...` 문법인 Spread Operator를 바벨로 변환을 못해줘서 그런 것 같은데 지금 뷰 CLI 2.x 버전(vue init webpack-simple 프로젝트이름)으로 생성하셨나요?

admin0024's profile image
admin0024

asked

Ask a question