I'm running a laravel project on a homestead vagrant box and i'm using laravel-mix ith the following
mix.sass('resources/scss/main.scss', 'assets/css/main.css').styles([
'node_modules/bootstrap/dist/css/bootstrap.css',
'node_modules/slick-carousel/slick/slick.css',
'resources/assets/css/menu.css',
'resources/assets/css/style.css',
'resources/assets/css/responsive.css',
], 'assets/css/all.css', __dirname);
/**
* Concat scripts
*/
mix.scripts([
'node_modules/jquery/dist/jquery.js',
'node_modules/bootstrap/dist/js/bootstrap.js',
'node_modules/slick-carousel/slick/slick.js',
'resources/assets/js/flaunt.js',
'resources/assets/js/main.js'
], 'assets/js/all.js');
/**
* Copy Font directory https://laravel.com/docs/5.4/mix#url-processing
*/
// mix.copy(
// 'fonts',
// '../../public/fonts'
// );
mix.browserSync({
host: 'localhost',
port: 3000,
proxy: 'http://dohlapse.test',
files: [
'../../public/**/*.css',
'../../public/**/*.js',
'../../resources/views/**/*',
],
watchOptions: {
usePolling: true,
interval: 500
},
},
// plugin options
{
// prevent BrowserSync from reloading the page
// and let Webpack Dev Server take care of this
reload: false,
open: false
});
/**
* Publishing the assets
*/
mix.webpackConfig({
plugins: [
new WebpackShellPlugin({onBuildStart: ['echo "Starting"'], onBuildEnd:['php ../../artisan stylist:publish ' + themeInfo.name], onBuildExit:['php ../../artisan stylist:publish ' + themeInfo.name], dev: false, safe: true, verbose: true})
....
on runing npm run watch everything build as expected however when making changes the "onBuild" hook dosn't seem to fire.
What are possible causes for it not to work?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire