{"action":"created","issue":{"url":"https://api.github.com/repos/webpack/webpack/issues/2386","repository_url":"https://api.github.com/repos/webpack/webpack","labels_url":"https://api.github.com/repos/webpack/webpack/issues/2386/labels{/name}","comments_url":"https://api.github.com/repos/webpack/webpack/issues/2386/comments","events_url":"https://api.github.com/repos/webpack/webpack/issues/2386/events","html_url":"https://github.com/webpack/webpack/issues/2386","id":150660533,"number":2386,"title":"How to determine whether the component is loaded about ‘require.ensure’ ?","user":{"login":"GitHubXur","id":8422702,"avatar_url":"https://avatars.githubusercontent.com/u/8422702?v=3","gravatar_id":"","url":"https://api.github.com/users/GitHubXur","html_url":"https://github.com/GitHubXur","followers_url":"https://api.github.com/users/GitHubXur/followers","following_url":"https://api.github.com/users/GitHubXur/following{/other_user}","gists_url":"https://api.github.com/users/GitHubXur/gists{/gist_id}","starred_url":"https://api.github.com/users/GitHubXur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GitHubXur/subscriptions","organizations_url":"https://api.github.com/users/GitHubXur/orgs","repos_url":"https://api.github.com/users/GitHubXur/repos","events_url":"https://api.github.com/users/GitHubXur/events{/privacy}","received_events_url":"https://api.github.com/users/GitHubXur/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/webpack/webpack/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-24T13:27:35Z","updated_at":"2016-04-24T17:30:42Z","closed_at":null,"body":"**Code splitting** will `only request a code`, if it fails, will not `request again`. \r\nLoad failed to make it manually request the failed component files again?\r\nhow to know whether the component files loaded success or failure?\r\n\r\n```\r\nrequire.ensure(['a'], function(require){\r\n   \r\n})\r\n```\r\n\r\nPlease help me"},"comment":{"url":"https://api.github.com/repos/webpack/webpack/issues/comments/214004174","html_url":"https://github.com/webpack/webpack/issues/2386#issuecomment-214004174","issue_url":"https://api.github.com/repos/webpack/webpack/issues/2386","id":214004174,"user":{"login":"bebraw","id":166921,"avatar_url":"https://avatars.githubusercontent.com/u/166921?v=3","gravatar_id":"","url":"https://api.github.com/users/bebraw","html_url":"https://github.com/bebraw","followers_url":"https://api.github.com/users/bebraw/followers","following_url":"https://api.github.com/users/bebraw/following{/other_user}","gists_url":"https://api.github.com/users/bebraw/gists{/gist_id}","starred_url":"https://api.github.com/users/bebraw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bebraw/subscriptions","organizations_url":"https://api.github.com/users/bebraw/orgs","repos_url":"https://api.github.com/users/bebraw/repos","events_url":"https://api.github.com/users/bebraw/events{/privacy}","received_events_url":"https://api.github.com/users/bebraw/received_events","type":"User","site_admin":false},"created_at":"2016-04-24T17:30:42Z","updated_at":"2016-04-24T17:30:42Z","body":"Webpack 2 will provide `System.import('a').then(...).catch(...)` kind of structure. I think with webpack 1 you need to catch possible exception yourself. So wrap it in a `try-catch` and see how that goes."}}