You may find that in certain environments Webpack isn't updating when your files change. If this is the case on your system, consider the following
npm run watch-poll
What it does is, it manually checks for changes every Xms.
Hello there ! Hope you are doing well !
My problem is fairly simple but I'm too noob to handle it properly.
I'm using laravel mix and npm run watch to build my css. The build is good (no error displayed, css update occur), then the watch stop watching.
By far for me npm run dev is the same as npm run watch .
On another project npm run watch is coninously updating my css during dev ... but on this project ... it does not want to really watch.
My question is : where to look to find who is bullying npm run watch ?
webpack.mix.js
const mix = require('laravel-mix');
mix.js("resources/js/app.js", "public/js/app.js")
.sass("resources/sass/app.scss", "public/css");
mix.minify('public/js/app.js', 'public/css/app.css');
package.json
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --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 --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
"axios": "^0.19",
"bootstrap": "^4.5.3",
"cross-env": "^5.1",
"jquery": "^3.5.1",
"laravel-mix": "^5.0.7",
"lodash": "^4.17.20",
"popper.js": "^1.12",
"resolve-url-loader": "^3.1.2",
"sass": "^1.28.0",
"sass-loader": "^8.0.0",
"vue-template-compiler": "^2.6.12"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.1",
"jquery-ui": "^1.12.1"
}
}
Please or to participate in this conversation.