{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/969","repository_url":"https://api.github.com/repos/webpack/webpack-dev-server","labels_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/969/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/969/comments","events_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/969/events","html_url":"https://github.com/webpack/webpack-dev-server/issues/969","id":240349751,"number":969,"title":"webpack-dev-server hot-only arg ignored","user":{"login":"webpack-bot","id":26676291,"avatar_url":"https://avatars3.githubusercontent.com/u/26676291?v=3","gravatar_id":"","url":"https://api.github.com/users/webpack-bot","html_url":"https://github.com/webpack-bot","followers_url":"https://api.github.com/users/webpack-bot/followers","following_url":"https://api.github.com/users/webpack-bot/following{/other_user}","gists_url":"https://api.github.com/users/webpack-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/webpack-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webpack-bot/subscriptions","organizations_url":"https://api.github.com/users/webpack-bot/orgs","repos_url":"https://api.github.com/users/webpack-bot/repos","events_url":"https://api.github.com/users/webpack-bot/events{/privacy}","received_events_url":"https://api.github.com/users/webpack-bot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-04T08:35:21Z","updated_at":"2017-07-04T14:08:09Z","closed_at":null,"body":"This is about an issue [already reported in webpack-dev-server](https://github.com/webpack/webpack-dev-server/issues/877), but it seems like the optimal fix lies here in webpack land. I can submit a PR to fix.\r\n\r\n**Do you want to request a *feature* or report a *bug*?**\r\n\r\nI'd say a bug, but depends on how you look at it.\r\n\r\n**What is the current behavior?**\r\n\r\nWebpackDevServer supports a `--hot-only` argument which is like `--hot` but uses `webpack/hot/only-dev-server` instead of `webpack/hot/dev-server`.\r\n\r\nThe problem is we currently ***also*** need to pass `--hot` for this to work as expected, since webpack, which handles processing of arguments for adding the `webpack.HotModuleReplacementPlugin` instance, doesn't recognize `--hot-only`. This contradicts [the documentation which speaks of `--hot-only` as an *alternative* to `--hot`](https://webpack.js.org/configuration/dev-server/#devserver-hotonly-cli-only).\r\n\r\n**What is the expected behavior?**\r\n\r\nIf `--hot-only` is passed then we shouldn't need to pass `--hot` for HMR to work.\r\n\r\n**Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.**\r\n\r\nLatest webpack - 3.0. Latest webpack-dev-server - 2.5.\r\n\r\nIn my mind the best solution is to check for both `--hot-only` and `--hot` in [`webpack/bin/convert-argv.js`](https://github.com/webpack/webpack/blob/57825153e531a079eb0dbd2528e47f4cbafcc7f2/bin/convert-argv.js#L385) and run the same function for both. Agreed?\r\n\r\nThough it also might be worth considering whether this devserver-related configuration belongs in the webpack package proper.\n\n---\n\nThis issue was moved from webpack/webpack#5161 by @sokra. Orginal issue was by @benwiley4000.\n\n> Though it also might be worth considering whether this devserver-related configuration belongs in the webpack package proper.\r\n\r\nyes I think you are right here. This doesn't belong into webpack core.\r\n\r\nwebpack-dev-server can implement a hack here: It can add `argv.hot = true` when `argv[\"hot-only\"]` is used.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/comments/312887110","html_url":"https://github.com/webpack/webpack-dev-server/issues/969#issuecomment-312887110","issue_url":"https://api.github.com/repos/webpack/webpack-dev-server/issues/969","id":312887110,"user":{"login":"benwiley4000","id":13558253,"avatar_url":"https://avatars1.githubusercontent.com/u/13558253?v=3","gravatar_id":"","url":"https://api.github.com/users/benwiley4000","html_url":"https://github.com/benwiley4000","followers_url":"https://api.github.com/users/benwiley4000/followers","following_url":"https://api.github.com/users/benwiley4000/following{/other_user}","gists_url":"https://api.github.com/users/benwiley4000/gists{/gist_id}","starred_url":"https://api.github.com/users/benwiley4000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwiley4000/subscriptions","organizations_url":"https://api.github.com/users/benwiley4000/orgs","repos_url":"https://api.github.com/users/benwiley4000/repos","events_url":"https://api.github.com/users/benwiley4000/events{/privacy}","received_events_url":"https://api.github.com/users/benwiley4000/received_events","type":"User","site_admin":false},"created_at":"2017-07-04T14:08:09Z","updated_at":"2017-07-04T14:08:09Z","body":"Probably should be considered a duplicate of #877."}}
{"actor":{"display_login":"benwiley4000"}}