webpack-dashboard icon indicating copy to clipboard operation
webpack-dashboard copied to clipboard

keyboard shortcut - rebuild

Open digitall-it opened this issue 6 years ago • 1 comments

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 enteron 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.

digitall-it avatar Nov 22 '18 17:11 digitall-it

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.

  1. 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.
  2. 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 a webpack.config.dev.js to a webpack.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 single webpack 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!

parkerziegler avatar Nov 29 '18 22:11 parkerziegler