0

When watching a project with laravel mix, "npm run watch", it used to show the green status bar all the time. This was nice as when I hit save, it would quickly recompile just that one change. It now only shows it like one out 30 times that command is run. It has to recompile the who project each time. I cannot figure out whats the issue is here.

here's my package.json scripts section

   "dev": "npm run development",
   "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
   "watch": "npm run development -- --watch",
   "watch-poll": "npm run watch -- --watch-poll",
   "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
   "prod": "npm run production",
   "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --config=node_modules/laravel-mix/setup/webpack.config.js"
 },```
1
  • There is nothing wrong with your command, except that you can use mix directly, try to use mix watch to see if it changes anything
    – Lk77
    Commented Oct 24, 2023 at 14:58

1 Answer 1

0

It turns out I had debug set to true in my webpack config. Changing this to false now shows the status bar everytime.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.