webpack-dashboard: Non-watch Webpack instances hang when dashboard is running
My workflow has a watch, and then a non-watch webpack process. The non-watch one runs any time I push or pull from git. When i have the watch process running, with the dashboard, the non-watch process hangs until i kill it or the dashboard.
Steps to reproduce the problem
Run any webpack profile, without the --watch
flag, and with the plugin included, and it will hang after its finished, with or without webpack-dashboard actually running.
Please provide a gist of relevant files
webpack -d --progress --colors --config webpack.config.js
Webpack Config File https://gist.github.com/aequasi/7cc2378fc965c013ade0b4a1a4f6a8a5
More Details
- Any OS
- ITerm2/Terminal/PHPStorm
- 0.1.1
- xterm-256color
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 17 (6 by maintainers)
Commits related to this issue
- 🔧 fixes issue with webpack process not exiting correctly https://github.com/FormidableLabs/webpack-dashboard/issues/96 — committed to bartlomn/react-redux-saga-boilerplate by bartlomn 7 years ago
- Wait until apply to create inspectpack daemon (#215) This makes it so the dashboard plugin can be configured without creating the inspectpack daemon. If the daemon is created in the constructor, the... — committed to FormidableLabs/webpack-dashboard by tschaub 7 years ago
This is because you both are including the dashboard plugin in production. Putting a flag around it so it only gets added in dev, or splitting your config files into dev and prod should fix it.
Yes, but is there a reason for plugin to “hang” the process?
This makes it somewhat more difficult to keep configurations intact - you cannot call
webpack
withwebpack-dashboard
if plugin is not enabled and if you do enable it, it will hang the process even if it’s called withoutwebpack-dashboard
.Could it maybe look at the child process? As
webpack
exits after job is done andwebpack-dev-server
does not - just likewebpack-dashboard
should when running one or another.Furthermore, you cannot run
webpack
indevelopment
environment this way .I’ve proposed a fix for this in #215. In the meantime, here is a workaround:
👍 Seems wrong to hang when invoking
webpack
withoutwebpack-dashboard
.@fancyfootowork’s yargs solution worked for me.
I ran into the same error. I ended up adding yargs. Seems to do the trick. In webpack.config.js:
const argv = require('yargs').argv;
then after setting up the main config:
(to use merge just include that at the top of your webpack.config.js)
const merge = require('webpack-merge');