Stephan-v Stephan-v - 8 months ago 114
Node.js Question

Vueify not working with ES2015 - Gulp

I'm stuck on trying to get browserify/vueify to output ES2015 with Gulp. I did what the documentation said which is:

npm install\

And I have this in my gulpfile:

gulp.task('browserify', function() {

The documentation states:

Support ES2015 by default.

Am I suppose to require or import all the npm modules in my gulpfile or something? What am I missing here? Browserify works fine but as soon as I use ES2015 gulp errors out on me with:

SyntaxError: Unexpected token (32:6) while parsing...


Vueify supports es2015 inside Vue files, but you also need to pipe through browserify with es2015 enabled if you use it in entry.js. Browserify handles .js files and it needs to know es2015 too :)