normal npm run dev without -poll does not read file changes. so I added the -poll flag
but the the problem is after I run the npm run dev after compiling it automatically ends the process making it the same as running npm run webpack
{
"private": true,
"scripts": {
"webpack": "cross-env NODE_ENV=development webpack --progress --hide-modules",
"dev": "cross-env NODE_ENV=development webpack --watch-poll --progress --hide-modules",
"hmr": "cross-env NODE_ENV=development webpack-dev-server --inline --hot",
"production": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"devDependencies": {
"axios": "^0.15.3",
"gulp": "^3.9.1",
"laravel-mix": "^0.2.10",
"lodash": "^4.16.2",
"vue": "^2.0.1"
}
}
Try:
"dev": "cross-env NODE_ENV=development webpack --watch --watch-poll --progress --hide-modules"
@JeffreyWay I was having an issue with npm run watch not working on Homestead. I added --watch-poll to my script and now all is good. Might be a good idea to add that to the package.json file?
Most helpful comment
@JeffreyWay I was having an issue with
npm run watchnot working on Homestead. I added--watch-pollto my script and now all is good. Might be a good idea to add that to the package.json file?