{"action":"created","issue":{"url":"https://api.github.com/repos/mipearson/webpack-rails/issues/1","labels_url":"https://api.github.com/repos/mipearson/webpack-rails/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/mipearson/webpack-rails/issues/1/comments","events_url":"https://api.github.com/repos/mipearson/webpack-rails/issues/1/events","html_url":"https://github.com/mipearson/webpack-rails/pull/1","id":95675397,"number":1,"title":"One possible solution to the hotmodule reloading bug. ","user":{"login":"ryardley","id":1256409,"avatar_url":"https://avatars.githubusercontent.com/u/1256409?v=3","gravatar_id":"","url":"https://api.github.com/users/ryardley","html_url":"https://github.com/ryardley","followers_url":"https://api.github.com/users/ryardley/followers","following_url":"https://api.github.com/users/ryardley/following{/other_user}","gists_url":"https://api.github.com/users/ryardley/gists{/gist_id}","starred_url":"https://api.github.com/users/ryardley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryardley/subscriptions","organizations_url":"https://api.github.com/users/ryardley/orgs","repos_url":"https://api.github.com/users/ryardley/repos","events_url":"https://api.github.com/users/ryardley/events{/privacy}","received_events_url":"https://api.github.com/users/ryardley/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-17T15:08:35Z","updated_at":"2015-07-19T02:35:13Z","closed_at":"2015-07-19T02:35:13Z","pull_request":{"url":"https://api.github.com/repos/mipearson/webpack-rails/pulls/1","html_url":"https://github.com/mipearson/webpack-rails/pull/1","diff_url":"https://github.com/mipearson/webpack-rails/pull/1.diff","patch_url":"https://github.com/mipearson/webpack-rails/pull/1.patch"},"body":"We were getting bugs where this was passing an unescaped array as a file path after refresh from hot reloader.\r\n\r\nWhat is happening is that at certain points hot reload will ditch loading a patch and simply force refresh the page. When this happens the manifest is not updated. The `webpack-rails` helper gets the path from the manifest that was created by webpack under the `assetsByChunkName` key. Normally there is a single output file but in the case of an old manifest from hot reload there are multiple files provided in an array. This guards against the manifest key being an array. \r\n\r\nExample manifest entry: \r\n\r\n<img width=\"421\" alt=\"screen shot 2015-07-17 at 4 29 06 pm\" src=\"https://cloud.githubusercontent.com/assets/1256409/8750174/220bfa64-2ca6-11e5-94eb-939c80772463.png\">\r\n\r\nThere may be a second side of this bug where could try to work out why hotloader is giving up in the first place but this seems to solve the problem."},"comment":{"url":"https://api.github.com/repos/mipearson/webpack-rails/issues/comments/122616788","html_url":"https://github.com/mipearson/webpack-rails/pull/1#issuecomment-122616788","issue_url":"https://api.github.com/repos/mipearson/webpack-rails/issues/1","id":122616788,"user":{"login":"mipearson","id":97317,"avatar_url":"https://avatars.githubusercontent.com/u/97317?v=3","gravatar_id":"","url":"https://api.github.com/users/mipearson","html_url":"https://github.com/mipearson","followers_url":"https://api.github.com/users/mipearson/followers","following_url":"https://api.github.com/users/mipearson/following{/other_user}","gists_url":"https://api.github.com/users/mipearson/gists{/gist_id}","starred_url":"https://api.github.com/users/mipearson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mipearson/subscriptions","organizations_url":"https://api.github.com/users/mipearson/orgs","repos_url":"https://api.github.com/users/mipearson/repos","events_url":"https://api.github.com/users/mipearson/events{/privacy}","received_events_url":"https://api.github.com/users/mipearson/received_events","type":"User","site_admin":false},"created_at":"2015-07-19T02:35:12Z","updated_at":"2015-07-19T02:35:12Z","body":"Fixed in https://github.com/mipearson/webpack-rails/commit/24d1ee22e99e88cf9908ebc782b8c74d1aa945ae"}}