How do I get a simple Vue compilation going in Gulp? How do I get a simple Vue compilation going in Gulp? vue.js vue.js

How do I get a simple Vue compilation going in Gulp?


I actually adapted a plugin for this last year, based on vueify but without browserify. I think it does exactly what you want.

You can find it here: https://www.npmjs.com/package/gulp-vueify2

var vueify = require('gulp-vueify2');gulp.task('vueify', function () {  return gulp.src('components/**/*.vue')    .pipe(vueify(options))    .pipe(gulp.dest('./dist'));});

For people that don't need to use gulp, there are however much more consistent solutions to compile vue components, such as bili for librairies or parceljs for apps.

Last but not least, if you are ready to enforce some conventions, Nuxt is the perfect way to compile your app with minimal config work and optional server-side rendering built-in.