How to use vue.js with gulp? How to use vue.js with gulp? vue.js vue.js

How to use vue.js with gulp?


Vueify is a browserify transform; gulp-browserify isn't maintained anymore but I assume that you can still add vueify as a transform once it's installed:

gulp.task('browserify', function () {    return gulp.src('src/js/main.js')        .pipe(plumber())        .pipe(browserify({            debug: !env.p,            transform: ['vueify']       }))      .pipe(gulpif(env.p, uglify()))        .pipe(gulp.dest('build/js'));});


Check this out:This is a package which lets you setup gulp task for vue.js.

https://www.npmjs.com/package/gulp-vueify


Using:

.pipe(babel({presets: ['es2015']}))

On a normal gulp task helped me concat and uglify my vue.js files.

If this is what you meant, then you will also need to install babel with npm and add:

var babel = require('gulp-babel');