{"action":"created","issue":{"url":"https://api.github.com/repos/ironSource/node-generator-chrome-ninja/issues/2","labels_url":"https://api.github.com/repos/ironSource/node-generator-chrome-ninja/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/ironSource/node-generator-chrome-ninja/issues/2/comments","events_url":"https://api.github.com/repos/ironSource/node-generator-chrome-ninja/issues/2/events","html_url":"https://github.com/ironSource/node-generator-chrome-ninja/issues/2","id":113321176,"number":2,"title":"Hot reloading","user":{"login":"vweevers","id":3055345,"avatar_url":"https://avatars.githubusercontent.com/u/3055345?v=3","gravatar_id":"","url":"https://api.github.com/users/vweevers","html_url":"https://github.com/vweevers","followers_url":"https://api.github.com/users/vweevers/followers","following_url":"https://api.github.com/users/vweevers/following{/other_user}","gists_url":"https://api.github.com/users/vweevers/gists{/gist_id}","starred_url":"https://api.github.com/users/vweevers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vweevers/subscriptions","organizations_url":"https://api.github.com/users/vweevers/orgs","repos_url":"https://api.github.com/users/vweevers/repos","events_url":"https://api.github.com/users/vweevers/events{/privacy}","received_events_url":"https://api.github.com/users/vweevers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-26T09:58:10Z","updated_at":"2015-10-28T10:20:32Z","closed_at":null,"body":"Would be nice to add [livereactload](https://github.com/milankinen/livereactload)."},"comment":{"url":"https://api.github.com/repos/ironSource/node-generator-chrome-ninja/issues/comments/151792128","html_url":"https://github.com/ironSource/node-generator-chrome-ninja/issues/2#issuecomment-151792128","issue_url":"https://api.github.com/repos/ironSource/node-generator-chrome-ninja/issues/2","id":151792128,"user":{"login":"vweevers","id":3055345,"avatar_url":"https://avatars.githubusercontent.com/u/3055345?v=3","gravatar_id":"","url":"https://api.github.com/users/vweevers","html_url":"https://github.com/vweevers","followers_url":"https://api.github.com/users/vweevers/followers","following_url":"https://api.github.com/users/vweevers/following{/other_user}","gists_url":"https://api.github.com/users/vweevers/gists{/gist_id}","starred_url":"https://api.github.com/users/vweevers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vweevers/subscriptions","organizations_url":"https://api.github.com/users/vweevers/orgs","repos_url":"https://api.github.com/users/vweevers/repos","events_url":"https://api.github.com/users/vweevers/events{/privacy}","received_events_url":"https://api.github.com/users/vweevers/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T10:20:31Z","updated_at":"2015-10-28T10:20:31Z","body":"What I cooked up is slightly crazy: for each browsing context (e.g. a background page or content script), a separate reload server is started. For all but content scripts, that's a `livereactload` server - when a bundle changes, the `livereactload` client in the corresponding browsing context is notified and some module in that context is hot reloaded. Due to chrome's security model, content scripts are handled separately with a `mini-lr` server. When the content script bundle changes, the background page is notified, which then reloads the entire extension.\r\n\r\nIf you generate an extension with all the options enabled, and then run `gulp develop`, you'll get four websocket servers:\r\n\r\n- :4474 - for background page\r\n- :4475 - options page\r\n- :4476 - popup (browser or page action)\r\n- :35729 - for content scripts (but handled by background page)"}}