How can I use Elixir + Vueify like the Vue-Hackernews sample?
They use some command like this at the package.json
....
"scripts": {
"dev": "watchify -v -t vueify -e src/main.js -o build/build.js",
"build": "./node_modules/watchify/node_modules/.bin/browserify -t vueify src/main.js | uglifyjs -c -m > build/build.js"
}
...
But I do not know how to use it with Laravel Elixir
sudo npm install laravel-elixir-browserify vue vueify --save
In your gulpfile.js
add the following:
var elixir = require('laravel-elixir'); var vueify = require('laravel-elixir-browserify').init("vueify"); elixir(function(mix) { // resources/assets/js/main.js mix.vueify('main.js', {insertGlobals: true, transform: "vueify", output: "public/js"}); });
Be Happy =D
Laravel Elixir Browserify Extension Doc Click Here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.