LeBlaireau
LeBlaireau

Reputation: 17467

Vue with webkit - Unexpected token punc «(», expected punc «:»

I have an error when trying to uglify a vuejs project

 Unexpected token punc «(», expected punc «:»

It is actually when trying to export a component nav.vue

export default {
  props: ['pageName'],
  data () {
    return {
      activeNav:0
    }
  },

It does not seem to like the data() syntax. Has anyone solved this?

Upvotes: 1

Views: 2411

Answers (1)

LeBlaireau
LeBlaireau

Reputation: 17467

I simply did not have a .babelrc file

{
  "presets": [
    "es2015"
  ]

}

Upvotes: 2

Related Questions