Closed anewage closed 7 years ago
Hey @anewage to achive this you can install nodemon : npm install -g nodemon
Then watch for changes: nodemon --watch webpack.mix.js node_modules/.bin/laravel-multimix watch
This can also be easily added to workflow by:
nodemon
to project devDependencies"mix": "nodemon --watch webpack.mix.js node_modules/laravel-multimix/bin/mix"
For some reason nodemon
didn't work until I removed the last watch
. Thanks @pi0
"scripts": {
"mix": "nodemon --watch webpack.mix.js node_modules/.bin/laravel-multimix"
}
Update 1/3/2018 @pi0 script is working on Windows but mine is working on Ubuntu.
Not sure if this is a relative issue, but there isn't so much of a change when the
webpack.mix.js
file is updated while therun watch <package name>
is executing (changes in the webpack file are of course in the scope of the requested package!). So you have to stop the execution of that command, make the changes to webpack file and run it again to see the changes.Again, not sure if this is an appropriate question or the webpack is technically not meant to change or update during watch operation.