{"action":"created","issue":{"url":"https://api.github.com/repos/rackt/react-router/issues/2495","labels_url":"https://api.github.com/repos/rackt/react-router/issues/2495/labels{/name}","comments_url":"https://api.github.com/repos/rackt/react-router/issues/2495/comments","events_url":"https://api.github.com/repos/rackt/react-router/issues/2495/events","html_url":"https://github.com/rackt/react-router/issues/2495","id":115698298,"number":2495,"title":"Asynchronous Loading Fails with Babel 6.1","user":{"login":"michaelahlers","id":2034877,"avatar_url":"https://avatars.githubusercontent.com/u/2034877?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelahlers","html_url":"https://github.com/michaelahlers","followers_url":"https://api.github.com/users/michaelahlers/followers","following_url":"https://api.github.com/users/michaelahlers/following{/other_user}","gists_url":"https://api.github.com/users/michaelahlers/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelahlers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelahlers/subscriptions","organizations_url":"https://api.github.com/users/michaelahlers/orgs","repos_url":"https://api.github.com/users/michaelahlers/repos","events_url":"https://api.github.com/users/michaelahlers/events{/privacy}","received_events_url":"https://api.github.com/users/michaelahlers/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-07T23:08:35Z","updated_at":"2015-11-08T00:31:10Z","closed_at":"2015-11-07T23:16:13Z","body":"After updating Babel, loading child routes and components asynchronously (following patterns from the [huge-apps example](https://github.com/rackt/react-router/tree/master/examples/huge-apps) fails (even though breakpoints on callbacks were hit). Haven't tracked this down to a narrow set of causes, and I'll update this ticket as I do.\r\n\r\nIn the meantime, flipping from:\r\n\r\n```javascript\r\n// package.json\r\n{\r\n  // ...\r\n  \"devDependencies\": {\r\n    \"babel-core\": \"^5.8.23\",\r\n    \"babel-loader\": \"^5.3.2\",\r\n    \"babel-runtime\": \"^5.8.24\"\r\n    // ...\r\n  }\r\n  // ...\r\n}\r\n\r\n// webpack.config.js\r\n{\r\n  // ...\r\n  module: {\r\n    // ...\r\n    loaders: [\r\n      {\r\n        test: /\\.js$/,\r\n        exclude: modulesPath,\r\n        loader: 'babel',\r\n        query: {\r\n          /* Enable ES7 features. */\r\n          stage: 2,\r\n          experimental: true,\r\n          cacheDirectory: true\r\n        }\r\n      }\r\n      // ...\r\n    ]\r\n  }\r\n  // ...\r\n}\r\n```\r\n\r\nTo this:\r\n\r\n```javascript\r\n// package.json\r\n{\r\n  // ...\r\n  \"devDependencies\": {\r\n    \"babel-core\": \"^6.1.2\",\r\n    \"babel-loader\": \"^6.0.1\",\r\n    \"babel-preset-es2015\": \"^6.1.2\",\r\n    \"babel-preset-react\": \"^6.1.2\",\r\n    \"babel-preset-stage-2\": \"^6.1.2\",\r\n    \"babel-runtime\": \"^6.0.14\"\r\n    // ...\r\n  }\r\n  // ...\r\n}\r\n\r\n// webpack.config.js\r\n{\r\n  // ...\r\n  module: {\r\n    // ...\r\n    loaders: [\r\n      {\r\n        test: /\\.js$/,\r\n        exclude: modulesPath,\r\n        loader: 'babel',\r\n        query: {\r\n          /* Enable ES7 features. */\r\n          presets: [ 'es2015', 'stage-2', 'react' ],\r\n          cacheDirectory: true\r\n        }\r\n      }\r\n      // ...\r\n    ]\r\n  }\r\n  // ...\r\n}\r\n```\r\n\r\nEffectively toggles between working and not."},"comment":{"url":"https://api.github.com/repos/rackt/react-router/issues/comments/154767540","html_url":"https://github.com/rackt/react-router/issues/2495#issuecomment-154767540","issue_url":"https://api.github.com/repos/rackt/react-router/issues/2495","id":154767540,"user":{"login":"taion","id":3112159,"avatar_url":"https://avatars.githubusercontent.com/u/3112159?v=3","gravatar_id":"","url":"https://api.github.com/users/taion","html_url":"https://github.com/taion","followers_url":"https://api.github.com/users/taion/followers","following_url":"https://api.github.com/users/taion/following{/other_user}","gists_url":"https://api.github.com/users/taion/gists{/gist_id}","starred_url":"https://api.github.com/users/taion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taion/subscriptions","organizations_url":"https://api.github.com/users/taion/orgs","repos_url":"https://api.github.com/users/taion/repos","events_url":"https://api.github.com/users/taion/events{/privacy}","received_events_url":"https://api.github.com/users/taion/received_events","type":"User","site_admin":false},"created_at":"2015-11-08T00:31:10Z","updated_at":"2015-11-08T00:31:10Z","body":"There's a few. You could explicitly do `module.default` when using it with `require`. You can also export with both `module.exports = ...` and `export default ...`."}}