Stephan-v Stephan-v - 2 years ago 269
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...

Answer Source

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 :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download