Anybody?
ES6 issue with Spark mixin after upgrade
After upgrading Laravel to 5.4 and Spark to 4.0 I run in to the following issue when running npm run production.
error /js/app.js from UglifyJs
Unexpected token punc «(», expected punc «:» [./spark/resources/assets/js/mixins/plans.js:7,4][/js/app.js:5757,8]
This is line 7 in ./spark/resources/assets/js/mixins/plans.js:
data() {
Seems like the Spark mixins are ignored by the babel loader but I'm not sure how to include them. Does anybody have an idea?
Yes I got the spread to work easily enough.. either stage-2, stage-3 or adding the transform-object-rest-spread, but then I would have a similar error to you as I detailed in that issue above
After fiddling for hours I just now finally got it to work by adding
this is my .babelrc
{
"presets": [
"es2015",
"stage-3"
]
}
and these are the dependencies that have made it work for me
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-3": "^6.24.1",
"uglify-es": "^3.0.3",
what a headache!
Please or to participate in this conversation.