Looks up require('vueify-insert-css')
calls to extract CSS from a browserify bundle
to a file.
$ browserify -t vueify -p [ vueify-extract-css -o bundle.css ] index.js \
-o bundle.js
const browserify = require('browserify')
browserify()
.transform('vueify')
.plugin('vueify-extract-css', { out: 'bundle.css' })
.bundle()
const browserify = require('browserify')
browserify()
.transform('vueify')
.plugin('vueify-extract-css', { out: createWriteStream })
.bundle()
function createWriteStream () {
return process.stdout
}
In your gulpfile, along with laravel-elixir-vueify:
var elixir = require('laravel-elixir');
require('laravel-elixir-vueify');
elixir.config.js.browserify.plugins.push({
name: 'vueify-extract-css',
options: {
out: 'path/to/extracted/bundle.css'
}
});
-o
/--out
: specify an outfile, defaults tobundle.css
. Can also be a function that returns a writable stream from the JavaScript API.
$ npm install vueify-extract-css