Currently, I am utilizing the laravel-elixir-vueify npm package for my project. Gulp watch functionality performs as expected when I make changes to files within the "scripts" or "styles" functions. However, there seems to be an issue when it comes to monitoring changes in the single file included in the "browserify" function. Below is the snippet of code I am working with:
var elixir = require('laravel-elixir');
require('laravel-elixir-vueify');
elixir(function(mix) {
mix.sass('app.scss')
.browserify(['main.js'
], './public/js/main.js')
.scripts([
'libs/jquery-2.1.1.js',
'libs/bootstrap.js',
'libs/vue.js',
], './public/js/libs.js')
.styles([
'libs/bootstrap.min.css',
'libs/style.css'
], './public/css/libs.css');
});
I have also attempted simplifying the code without success:
mix.sass('app.scss')
.browserify(['main.js')
(etc...)
My main goal is to ensure that gulp watch triggers whenever any changes are made to main.js. Additionally, there is a Vue component file imported into main.js which undergoes frequent modifications. It would greatly benefit me if gulp watch could detect these changes too. Any advice on how to achieve this?
If the above scenario is not possible, is there a way to specifically execute gulp so that it only recompiles the browserify file and skips the scripts/styles files?