Answer the question
In order to leave comments, you need to log in
How to config gulp to compile .vue (single-file components with styles) in dist?
Hello.
I need a config for gulp, after which the output was 2 files: out.css and out.js
.vue files (Single File Components) are input.
If possible, tell me how to do it right or where to dig, I already broke my whole head.
Answer the question
In order to leave comments, you need to log in
After a long and hard search, I found what I needed:
gulp.task('dev', function() {
return browserify({ entries: ['src/app/main.js']})
//.transform(babelify, { presets: ['es2015'] })
.transform(vueify)
.plugin('vueify/plugins/extract-css', { out: './bundle.css' })
.bundle()
.pipe(source('main.js'))
.pipe(gulp.dest('./dist'))
//.pipe(connect.reload());
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question