Laravel-mix: Plain js watching

Created on 2 Apr 2017  路  7Comments  路  Source: JeffreyWay/laravel-mix

With this setup:

mix
    .scripts(['resources/assets/js/functions.js', 'resources/assets/js/app.js'], 'public/js/app.js')
    .sass('resources/assets/sass/app.scss', 'public/css')
    .options({
        processCssUrls: false
    });

I don't get notifications on compile but the compile happens. The other thing is that changes take effect after 2 or 3 compiles. I have a timestamp added to public/js/app.js.

Most helpful comment

mix.scripts() isn't part of your core Webpack bundle, so that's why you're not seeing it. We could add a notification popup though.

All 7 comments

@ionesculiviucristian Are you using WebStorm/PhpStorm? There's an option that stops npm run watch to see the changes and needs to be disabled: Settings -> Appearance & Behaviour -> System Settings -> Use "safe write".

Didn't get any feedback like I get on css files after changing the setting in phpstorm. Is the console output correct, based on my above webpack file ?

untitled

Yes, watch unfortunately does not produce any console output, but it works - check your resulting files for changes, they should be visible.

I can confirm this issue.
I can see the new build files on each change in js but no output on console.

I can confirm this is also the case for me, no output is generated in the console, but they do compile.

mix.scripts() isn't part of your core Webpack bundle, so that's why you're not seeing it. We could add a notification popup though.

Notification would be nice, any update on this?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dtheb picture dtheb  路  3Comments

kpilard picture kpilard  路  3Comments

jpmurray picture jpmurray  路  3Comments

wendt88 picture wendt88  路  3Comments

sdebacker picture sdebacker  路  3Comments