{"action":"created","issue":{"url":"https://api.github.com/repos/zalmoxisus/browser-redux/issues/24","labels_url":"https://api.github.com/repos/zalmoxisus/browser-redux/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/zalmoxisus/browser-redux/issues/24/comments","events_url":"https://api.github.com/repos/zalmoxisus/browser-redux/issues/24/events","html_url":"https://github.com/zalmoxisus/browser-redux/issues/24","id":123657041,"number":24,"title":"Why is webpack/replace necessary?","user":{"login":"sseppola","id":4065840,"avatar_url":"https://avatars.githubusercontent.com/u/4065840?v=3","gravatar_id":"","url":"https://api.github.com/users/sseppola","html_url":"https://github.com/sseppola","followers_url":"https://api.github.com/users/sseppola/followers","following_url":"https://api.github.com/users/sseppola/following{/other_user}","gists_url":"https://api.github.com/users/sseppola/gists{/gist_id}","starred_url":"https://api.github.com/users/sseppola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sseppola/subscriptions","organizations_url":"https://api.github.com/users/sseppola/orgs","repos_url":"https://api.github.com/users/sseppola/repos","events_url":"https://api.github.com/users/sseppola/events{/privacy}","received_events_url":"https://api.github.com/users/sseppola/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-23T13:08:57Z","updated_at":"2015-12-23T16:02:38Z","closed_at":null,"body":"I don't understand what these do, and why they are necessary. Is there a discussion around why they were built somewhere?"},"comment":{"url":"https://api.github.com/repos/zalmoxisus/browser-redux/issues/comments/166931588","html_url":"https://github.com/zalmoxisus/browser-redux/issues/24#issuecomment-166931588","issue_url":"https://api.github.com/repos/zalmoxisus/browser-redux/issues/24","id":166931588,"user":{"login":"jhen0409","id":3001525,"avatar_url":"https://avatars.githubusercontent.com/u/3001525?v=3","gravatar_id":"","url":"https://api.github.com/users/jhen0409","html_url":"https://github.com/jhen0409","followers_url":"https://api.github.com/users/jhen0409/followers","following_url":"https://api.github.com/users/jhen0409/following{/other_user}","gists_url":"https://api.github.com/users/jhen0409/gists{/gist_id}","starred_url":"https://api.github.com/users/jhen0409/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhen0409/subscriptions","organizations_url":"https://api.github.com/users/jhen0409/orgs","repos_url":"https://api.github.com/users/jhen0409/repos","events_url":"https://api.github.com/users/jhen0409/events{/privacy}","received_events_url":"https://api.github.com/users/jhen0409/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T16:02:38Z","updated_at":"2015-12-23T16:02:38Z","body":"The `webpack/replace` it do two things:\r\n\r\n1. if modules couldn't be hot updated, we need full reload, but it's inconvenient for Chrome Extension, so we call `chrome.runtime.reload`. ([JsonpMainTemplate.runtime.js#L12-L26](https://github.com/zalmoxisus/browser-redux/blob/master/webpack/replace/JsonpMainTemplate.runtime.js#L12-L26), origin: [lib/JsonpMainTemplate.runtime.js](https://github.com/webpack/webpack/blob/master/lib/JsonpMainTemplate.runtime.js))\r\n2. The `script` tag have problem in Content Scripts page, because it‘s no way to get `webpackHotUpdate` function (in a different context), so we use eval code to fix it. ([log-apply-result.js#L16-L21](https://github.com/zalmoxisus/browser-redux/blob/master/webpack/replace/log-apply-result.js#L16-L21), origin: [hot/log-apply-result.js](https://github.com/webpack/webpack/blob/master/hot/log-apply-result.js))"}}