Hectix's avatar

npm run watch not actually watching files

mix.scripts([
    'node_modules/jquery/dist/jquery.js',
    'resources/js/article.js'], 'public/js/article.js');

When I change resources/js/article.js, nothing happens... I'm sure that I have newest version of laravel mix.

0 likes
6 replies
mvd's avatar

Hi @Hectix,

Just a question to confirm , did you include public/js/article.js in your template ? If so, do you see the changes if you run 'npm run dev' or 'npm run prod' in file public/js/article.js

Hectix's avatar

@mvd

Sure, I did. I mean, now, every time I change something in resources/js/article.js, I need run npm run dev...

Hectix's avatar

It looks like npm run watch does not react to mix.scripts()

Hectix's avatar
Hectix
OP
Best Answer
Level 1

Problem solved. It was not really a problem. When you are watching mix.scripts(), they do not show anything in console, so it's actually working but without any indicator of compilation in console. Thanks for help.

Please or to participate in this conversation.