Any help would be appreciated, the way I do it I can't use browsersync any more.
Here is an example of my webpack.mix.js
mix.stylus('resources/assets/stylus/front/landing.styl', __dirname + '/tmp/public/build/tmp/css/front/');
//other staging here
mix.copy(__dirname+ '/tmp/public/build/tmp/css/front/landing.css','resources/assets/css/landing.css');
// finish organizing files.
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css')
.then(()=>{
if (fs.existsSync(__dirname + '/public/build')){
console.log('file exists');
fs.removeSync(__dirname + '/public/build');
}else{
console.log('file doesn\'t exist');
}
});
mix.browserSync({
proxy: 'domain.dev'
});
when the promise returns to delete the directory with all the staging files if the watch option is on, it will just keep running in an infinite loop.
My earlier configs seemed to work but now, it seems mix.preprocess "forces" you to use your public directory, instead of allowing you to process stylus to a css file directly in your resource/assets. I can't seem to find a work around where, I can pull in all our stylus core, and still use bulma sass.
Any ideas welcome.