Laravel-mix: ignore compile same files

Created on 13 Jul 2018  路  4Comments  路  Source: JeffreyWay/laravel-mix

i have large project . laravel mix in large project not have solution for ignore compile same plugins like bootstrap-scss , in each change bootstrap-scss recompiling and this not good.

how i can set interval for one file for example just compile one time after run npm run watch

thank you

stale

Most helpful comment

i found simple way .

just create another mix like bellow

let mixFirst = require('laravel-mix');
let mixSecond  = require('laravel-mix');


//First mix
mixFirst.js(moduleFolder + '/Base/src/Asset/js/Base.js',        'public/app/js')
    .sass(moduleFolder + '/Base/src/Asset/scss/Base.scss',  'public/app/css');

//second mix
mixSecond.js(moduleFolder + '/Base/src/Asset/js/Base.js',       'public/app/js')
    .sass(moduleFolder + '/Base/src/Asset/scss/Base.scss',  'public/app/css');

this seperate in two watch in second it run bootstrap-sass and in first main app

All 4 comments

i found simple way .

just create another mix like bellow

let mixFirst = require('laravel-mix');
let mixSecond  = require('laravel-mix');


//First mix
mixFirst.js(moduleFolder + '/Base/src/Asset/js/Base.js',        'public/app/js')
    .sass(moduleFolder + '/Base/src/Asset/scss/Base.scss',  'public/app/css');

//second mix
mixSecond.js(moduleFolder + '/Base/src/Asset/js/Base.js',       'public/app/js')
    .sass(moduleFolder + '/Base/src/Asset/scss/Base.scss',  'public/app/css');

this seperate in two watch in second it run bootstrap-sass and in first main app

@vahidalvandi
I didn't know about it.
I will try it tomorrow and if this worked, it should go to docs.
Thanks

yes it worked !

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amin101 picture amin101  路  3Comments

pixieaka picture pixieaka  路  3Comments

Bomavi picture Bomavi  路  3Comments

sdebacker picture sdebacker  路  3Comments

rderimay picture rderimay  路  3Comments