webpack-dashboard
webpack-dashboard copied to clipboard
keyboard shortcut - rebuild
I'm on OSX Mojave, the dashboard is fantastic. Is there a keyboard shortcut to manually restart the npm build script? I actually press q
to exit and then navigate the history with up arrow
and then I press enter
on the keyboard. It works in a dev server by typing rs
, it is a feature of nodemon
, but I sometimes do a build of a different config from the dev server one and cannot use that useful functionality. I hope I'm clear enough. If there is not such a function, I would like to file a feature request.
Hey @digitall-it sorry for getting back to you a bit late. This is a great idea and one I'd like to explore! I'd like to clarify some things.
- Is the dashboard not restarting for you when you make changes to your files? We have a compiler hook to listen for when
webpack
emits an invalid build (basically, it's indicating that it's restarting the build): https://github.com/FormidableLabs/webpack-dashboard/blob/master/plugin/index.js#L127 It should be watching for file changes, I'll verify that that's happening. - I'm a bit confused about what is changing that is causing you to restart the build? Are you pointing at a different
webpack
config (i.e. switching from awebpack.config.dev.js
to awebpack.config.prod.js
)? If so, I'm not sure what we can do to support that. There are some workarounds to listen for changes to a singlewebpack
config listed here: https://github.com/webpack/webpack-cli/issues/15.
If you can point me at a sample repo illustrating your use case that would be super helpful! I'm not totally sure of an approach here, so if you have an idea for how this could be implemented feel free to start hacking. Otherwise, drop some notes in here and I'll try to get some time to spec this out in December. Thanks for the feature request!