Hi, any idea how I would add other directories to be watched?
You can't right now, unless you copy our webpack.config.js file to your project root, and maintain it yourself.
Any update to this issue? Perhaps using mix.webpackConfig() somehow?
mix.browserSync({
files: ['file.js']
});
It does the trick. More info https://browsersync.io/docs/options
@tiagomatosweb doing this doesn't rebuild JS/CSS files from sources, nor does it even cause the browser to refresh. I'm watching .env and a SASS variables file that gets symlinked into the SASS build pipeline, and changing either one does nothing.
Mm.. not sure! It was a workaround while ago. Do not remember if it recompile everything once those files set in browserSycn object are updated. Sorry mate.
Is there anything we can do about this? It is clearly still an issue as subfolders are not watched at ALL by npm run watch.
I have managers in resources/js/managers. If I move the files to root, they are watched, but if they are put into the managers subfolder they are completely ignored.
I think the webpack HMR can be used/extended
https://webpack.js.org/guides/hot-module-replacement
mix.browserSync({ files: ['file.js'] });It does the trick. More info https://browsersync.io/docs/options
it's just reload and not trigger laravel-mix compiling
Most helpful comment
it's just reload and not trigger laravel-mix compiling