Kinrany / vue-p5

Vue component for p5.js
125 stars 16 forks source link

Fix the cause of `npm run build` failure in vue-p5-example. #1

Closed Kinrany closed 6 years ago

Kinrany commented 6 years ago
UglifyJS error: unexpected ES6+ code in module "vue-p5", full error message:

vendor.1379d7f2.js from UglifyJs
Unexpected token: punc ()) [./node_modules/vue-p5/dist/vue-p5.js:19,0][vendor.1379d7f2.js:9264,16]

 TIP  To fix this, try adding "vue-p5" to "transformModules" option, eg:

// poi.config.js
module.exports = {
  transformModules: ['vue-p5'],
  // ...other config
}

Adding transformModules does fix the issue.