-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restart after config change #440
Comments
Or allow, add list of files to watch for changes that restart the server if changed. |
I found a way to do this with the ever-useful nodemon I frequently forget to restart my server after config changes and I've wasted lots of time "debugging" things that work because of that. I think anything that can lower the cognitive overhead in our workflows is generally worthwhile. The fewer environmental gotchas I need to worry about, the more of my limited brainpower I can direct towards the important stuff--writing cool apps. However I can see an argument for not adding a restart feature to webpack (keeping it light and focused on what it does well). If my 'nodemon' hack is sufficient, perhaps it could become an example in the documentation. I've set up the command in my "scripts": {
"start": "nodemon --watch webpack.config.js ./node_modules/.bin/webpack-dev-server",
"test": "echo \"Error: no test specified. Write some tests, you slacker\" && exit 1"
},
"dependencies":
... note: |
I've been thinking about this for a bit, and I think this is actually something that should be fixed in webpack. webpack already has |
See webpack/webpack#3153. |
@diskodan For some reason, EDIT: I figured it out
|
This is a minor feature request: In addition to regular source files, also watch for changes on the webpack.config.js file. When it changes, restart the entire process (or whatever subprocess/system necessary) to run with the updated config.
Helps avoid the issue of config changes not applying to the running server, which sometimes takes minutes to hours to realize.
If this sounds like a good idea, I may be able to help implement it (haven't yet looked at the source of this repo).
The text was updated successfully, but these errors were encountered: