gulp.task('bundle-for-dev', function () {
return browserify({entries: ['./src/js/entry.js']}) // path to your entry file here
.transform(vueify)
.plugin('vueify/plugins/extract-css', { out: './tmp/css/bundle.css' }) // path to where you want your css
.transform(babelify, {"presets": ["es2015"]})
.external('vue') // remove vue from the bundle, if you omit this line whole vue will be bundled with your code
.bundle()
.pipe(source('bundle.js'))
.pipe(gulp.dest('./tmp/js'));
})
var babelify = require('babelify'),
browserify = require('browserify'),
buffer = require('vinyl-buffer'),
es = require('event-stream'),
gulp = require('gulp'),
source = require('vinyl-source-stream'),
uglify = require('gulp-uglify'),
uglifyify = require('uglifyify'),
vueify = require('vueify');
"browser": {
"vue": "vue/dist/vue.common.js"
}