{"action":"closed","number":336,"pull_request":{"url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/pulls/336","id":219738396,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NzM4Mzk2","html_url":"https://github.com/webpack-contrib/webpack-hot-middleware/pull/336","diff_url":"https://github.com/webpack-contrib/webpack-hot-middleware/pull/336.diff","patch_url":"https://github.com/webpack-contrib/webpack-hot-middleware/pull/336.patch","issue_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/issues/336","number":336,"state":"closed","locked":false,"title":"Add `cache: true` from stats.toJson options to fix HMR in certain setups","user":{"login":"chiplay","id":1345767,"node_id":"MDQ6VXNlcjEzNDU3Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/1345767?v=4","gravatar_id":"","url":"https://api.github.com/users/chiplay","html_url":"https://github.com/chiplay","followers_url":"https://api.github.com/users/chiplay/followers","following_url":"https://api.github.com/users/chiplay/following{/other_user}","gists_url":"https://api.github.com/users/chiplay/gists{/gist_id}","starred_url":"https://api.github.com/users/chiplay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chiplay/subscriptions","organizations_url":"https://api.github.com/users/chiplay/orgs","repos_url":"https://api.github.com/users/chiplay/repos","events_url":"https://api.github.com/users/chiplay/events{/privacy}","received_events_url":"https://api.github.com/users/chiplay/received_events","type":"User","site_admin":false},"body":"This PR contains a:\r\n\r\n- [x] **bugfix**\r\n- [ ] new **feature**\r\n- [ ] **code refactor**\r\n- [ ] **test update** <!-- if bug or feature is checked, this should be too -->\r\n- [ ] **typo fix**\r\n- [ ] **metadata update**\r\n\r\n### Motivation / Use-Case\r\n\r\nHMR stopped working with our project starting with v2.23.0.  I did some digging and found that this one particular stats.toJson option, `all: false`, is causing the issue and removing it fixes HMR for our use case.  Unless there is a specific reason for keeping it, I'd love to see it removed incase it is breaking other projects as well.\r\n\r\n### Breaking Changes\r\n\r\nn/a\r\n\r\n### Additional Info\r\n\r\npackage.json (shortened to relevant bits)\r\n\r\n```\r\n\"devDependencies\": {\r\n  \"@babel/cli\": \"^7.1.2\",\r\n  \"@babel/core\": \"^7.1.2\",\r\n  \"@babel/plugin-proposal-class-properties\": \"^7.1.0\",\r\n  \"@babel/plugin-proposal-decorators\": \"^7.1.2\",\r\n  \"@babel/plugin-proposal-object-rest-spread\": \"^7.0.0\",\r\n  \"@babel/preset-env\": \"^7.1.0\",\r\n  \"@babel/preset-react\": \"^7.0.0\",\r\n  \"@babel/preset-typescript\": \"^7.1.0\",\r\n  \"babel-loader\": \"^8.0.4\",\r\n  \"babel-preset-modern-browsers\": \"^12.0.0\",\r\n  \"browser-sync\": \"2.23.7\",\r\n  \"gulp\": \"^4.0.0\",\r\n  \"react\": \"^16.4.2\",\r\n  \"react-dom\": \"^16.4.2\",\r\n  \"react-hot-loader\": \"^4.3.4\",\r\n  \"typescript\": \"2.8.4\",\r\n  \"webpack\": \"^4.20.2\",\r\n  \"webpack-dev-middleware\": \"^3.4.0\",\r\n  \"webpack-hot-middleware\": \"2.23.0\"\r\n}\r\n```\r\n\r\ngulpfile.js (shortened to relevant bits)\r\n\r\n```\r\nconst webpack = require('webpack');\r\nconst webpackDevMiddleware = require('webpack-dev-middleware');\r\nconst webpackHotMiddleware = require('webpack-hot-middleware');\r\nconst browserSync = require('browser-sync');\r\nconst bs = browserSync.create();\r\n\r\ngulp.task('serve', server);\r\n\r\nfunction server() {\r\n  const statsConfig = {\r\n    colors: true, hash: false, version: false, assets: true, chunks: false,\r\n    chunkModules: false, modules: false, children: false, reasons: false,\r\n    source: false, errorDetails: false, chunkOrigins: false\r\n  };\r\n\r\n  const bundler = webpack(multiEntryConfig);\r\n\r\n  bs.init({\r\n    proxy: {\r\n      target: 'example.com:8080',\r\n      middleware: [\r\n        webpackDevMiddleware(bundler, {\r\n          stats: statsConfig,\r\n          publicPath: '/s/',\r\n          writeToDisk: true\r\n        }),\r\n        webpackHotMiddleware(bundler)\r\n      ]\r\n    }\r\n  });\r\n}\r\n```\r\n","created_at":"2018-10-02T15:04:57Z","updated_at":"2018-10-08T10:56:41Z","closed_at":"2018-10-08T10:56:41Z","merged_at":"2018-10-08T10:56:41Z","merge_commit_sha":"621155d4e66f4e3fed6b38a637da8c0b6f1a5079","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/pulls/336/commits","review_comments_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/pulls/336/comments","review_comment_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/pulls/comments{/number}","comments_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/issues/336/comments","statuses_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/statuses/af4d5bdfa3fea8460d7afda9895396df40141eb2","head":{"label":"chiplay:patch-1","ref":"patch-1","sha":"af4d5bdfa3fea8460d7afda9895396df40141eb2","user":{"login":"chiplay","id":1345767,"node_id":"MDQ6VXNlcjEzNDU3Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/1345767?v=4","gravatar_id":"","url":"https://api.github.com/users/chiplay","html_url":"https://github.com/chiplay","followers_url":"https://api.github.com/users/chiplay/followers","following_url":"https://api.github.com/users/chiplay/following{/other_user}","gists_url":"https://api.github.com/users/chiplay/gists{/gist_id}","starred_url":"https://api.github.com/users/chiplay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chiplay/subscriptions","organizations_url":"https://api.github.com/users/chiplay/orgs","repos_url":"https://api.github.com/users/chiplay/repos","events_url":"https://api.github.com/users/chiplay/events{/privacy}","received_events_url":"https://api.github.com/users/chiplay/received_events","type":"User","site_admin":false},"repo":{"id":151269444,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEyNjk0NDQ=","name":"webpack-hot-middleware","full_name":"chiplay/webpack-hot-middleware","private":false,"owner":{"login":"chiplay","id":1345767,"node_id":"MDQ6VXNlcjEzNDU3Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/1345767?v=4","gravatar_id":"","url":"https://api.github.com/users/chiplay","html_url":"https://github.com/chiplay","followers_url":"https://api.github.com/users/chiplay/followers","following_url":"https://api.github.com/users/chiplay/following{/other_user}","gists_url":"https://api.github.com/users/chiplay/gists{/gist_id}","starred_url":"https://api.github.com/users/chiplay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chiplay/subscriptions","organizations_url":"https://api.github.com/users/chiplay/orgs","repos_url":"https://api.github.com/users/chiplay/repos","events_url":"https://api.github.com/users/chiplay/events{/privacy}","received_events_url":"https://api.github.com/users/chiplay/received_events","type":"User","site_admin":false},"html_url":"https://github.com/chiplay/webpack-hot-middleware","description":"Webpack hot reloading you can attach to your own server","fork":true,"url":"https://api.github.com/repos/chiplay/webpack-hot-middleware","forks_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/forks","keys_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/teams","hooks_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/hooks","issue_events_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/issues/events{/number}","events_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/events","assignees_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/assignees{/user}","branches_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/branches{/branch}","tags_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/tags","blobs_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/git/refs{/sha}","trees_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/statuses/{sha}","languages_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/languages","stargazers_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/stargazers","contributors_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/contributors","subscribers_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/subscribers","subscription_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/subscription","commits_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/commits{/sha}","git_commits_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/git/commits{/sha}","comments_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/comments{/number}","issue_comment_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/issues/comments{/number}","contents_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/contents/{+path}","compare_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/merges","archive_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/downloads","issues_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/issues{/number}","pulls_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/pulls{/number}","milestones_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/milestones{/number}","notifications_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/labels{/name}","releases_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/releases{/id}","deployments_url":"https://api.github.com/repos/chiplay/webpack-hot-middleware/deployments","created_at":"2018-10-02T14:34:44Z","updated_at":"2018-10-02T14:34:46Z","pushed_at":"2018-10-04T19:33:40Z","git_url":"git://github.com/chiplay/webpack-hot-middleware.git","ssh_url":"git@github.com:chiplay/webpack-hot-middleware.git","clone_url":"https://github.com/chiplay/webpack-hot-middleware.git","svn_url":"https://github.com/chiplay/webpack-hot-middleware","homepage":null,"size":445,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"webpack-contrib:master","ref":"master","sha":"0307650b19bfb8e5255a5b490b3435813b4d64c9","user":{"login":"webpack-contrib","id":25012217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDEyMjE3","avatar_url":"https://avatars3.githubusercontent.com/u/25012217?v=4","gravatar_id":"","url":"https://api.github.com/users/webpack-contrib","html_url":"https://github.com/webpack-contrib","followers_url":"https://api.github.com/users/webpack-contrib/followers","following_url":"https://api.github.com/users/webpack-contrib/following{/other_user}","gists_url":"https://api.github.com/users/webpack-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/webpack-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webpack-contrib/subscriptions","organizations_url":"https://api.github.com/users/webpack-contrib/orgs","repos_url":"https://api.github.com/users/webpack-contrib/repos","events_url":"https://api.github.com/users/webpack-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/webpack-contrib/received_events","type":"Organization","site_admin":false},"repo":{"id":34994276,"node_id":"MDEwOlJlcG9zaXRvcnkzNDk5NDI3Ng==","name":"webpack-hot-middleware","full_name":"webpack-contrib/webpack-hot-middleware","private":false,"owner":{"login":"webpack-contrib","id":25012217,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDEyMjE3","avatar_url":"https://avatars3.githubusercontent.com/u/25012217?v=4","gravatar_id":"","url":"https://api.github.com/users/webpack-contrib","html_url":"https://github.com/webpack-contrib","followers_url":"https://api.github.com/users/webpack-contrib/followers","following_url":"https://api.github.com/users/webpack-contrib/following{/other_user}","gists_url":"https://api.github.com/users/webpack-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/webpack-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webpack-contrib/subscriptions","organizations_url":"https://api.github.com/users/webpack-contrib/orgs","repos_url":"https://api.github.com/users/webpack-contrib/repos","events_url":"https://api.github.com/users/webpack-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/webpack-contrib/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/webpack-contrib/webpack-hot-middleware","description":"Webpack hot reloading you can attach to your own server","fork":false,"url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware","forks_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/forks","keys_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/teams","hooks_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/hooks","issue_events_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/issues/events{/number}","events_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/events","assignees_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/assignees{/user}","branches_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/branches{/branch}","tags_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/tags","blobs_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/git/refs{/sha}","trees_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/statuses/{sha}","languages_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/languages","stargazers_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/stargazers","contributors_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/contributors","subscribers_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/subscribers","subscription_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/subscription","commits_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/commits{/sha}","git_commits_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/git/commits{/sha}","comments_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/comments{/number}","issue_comment_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/issues/comments{/number}","contents_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/contents/{+path}","compare_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/merges","archive_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/downloads","issues_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/issues{/number}","pulls_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/pulls{/number}","milestones_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/milestones{/number}","notifications_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/labels{/name}","releases_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/releases{/id}","deployments_url":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/deployments","created_at":"2015-05-03T17:25:50Z","updated_at":"2018-10-08T07:58:13Z","pushed_at":"2018-10-08T10:56:41Z","git_url":"git://github.com/webpack-contrib/webpack-hot-middleware.git","ssh_url":"git@github.com:webpack-contrib/webpack-hot-middleware.git","clone_url":"https://github.com/webpack-contrib/webpack-hot-middleware.git","svn_url":"https://github.com/webpack-contrib/webpack-hot-middleware","homepage":null,"size":543,"stargazers_count":1816,"watchers_count":1816,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":213,"mirror_url":null,"archived":false,"open_issues_count":72,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":213,"open_issues":72,"watchers":1816,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/pulls/336"},"html":{"href":"https://github.com/webpack-contrib/webpack-hot-middleware/pull/336"},"issue":{"href":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/issues/336"},"comments":{"href":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/issues/336/comments"},"review_comments":{"href":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/pulls/336/comments"},"review_comment":{"href":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/pulls/336/commits"},"statuses":{"href":"https://api.github.com/repos/webpack-contrib/webpack-hot-middleware/statuses/af4d5bdfa3fea8460d7afda9895396df40141eb2"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"glenjamin","id":151272,"node_id":"MDQ6VXNlcjE1MTI3Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/151272?v=4","gravatar_id":"","url":"https://api.github.com/users/glenjamin","html_url":"https://github.com/glenjamin","followers_url":"https://api.github.com/users/glenjamin/followers","following_url":"https://api.github.com/users/glenjamin/following{/other_user}","gists_url":"https://api.github.com/users/glenjamin/gists{/gist_id}","starred_url":"https://api.github.com/users/glenjamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glenjamin/subscriptions","organizations_url":"https://api.github.com/users/glenjamin/orgs","repos_url":"https://api.github.com/users/glenjamin/repos","events_url":"https://api.github.com/users/glenjamin/events{/privacy}","received_events_url":"https://api.github.com/users/glenjamin/received_events","type":"User","site_admin":false},"comments":9,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":1,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"glenjamin"}}