{"action":"created","issue":{"url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/760","repository_url":"https://api.github.com/repos/gaearon/react-hot-loader","labels_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/760/labels{/name}","comments_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/760/comments","events_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/760/events","html_url":"https://github.com/gaearon/react-hot-loader/issues/760","id":285222691,"number":760,"title":"[next] Imports broken after adding `babel-loader`","user":{"login":"DevanB","id":354652,"avatar_url":"https://avatars0.githubusercontent.com/u/354652?v=4","gravatar_id":"","url":"https://api.github.com/users/DevanB","html_url":"https://github.com/DevanB","followers_url":"https://api.github.com/users/DevanB/followers","following_url":"https://api.github.com/users/DevanB/following{/other_user}","gists_url":"https://api.github.com/users/DevanB/gists{/gist_id}","starred_url":"https://api.github.com/users/DevanB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevanB/subscriptions","organizations_url":"https://api.github.com/users/DevanB/orgs","repos_url":"https://api.github.com/users/DevanB/repos","events_url":"https://api.github.com/users/DevanB/events{/privacy}","received_events_url":"https://api.github.com/users/DevanB/received_events","type":"User","site_admin":false},"labels":[{"id":113576978,"url":"https://api.github.com/repos/gaearon/react-hot-loader/labels/bug","name":"bug","color":"eb3d31","default":true},{"id":788358242,"url":"https://api.github.com/repos/gaearon/react-hot-loader/labels/v4","name":"v4","color":"9892e5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-30T20:40:21Z","updated_at":"2017-12-30T21:44:51Z","closed_at":null,"author_association":"NONE","body":"### Description\r\n\r\nAfter following setup instructions for TypeScript, imports (using react-loadable) are failing. It appears that the issue is adding `babel-loader`.\r\n\r\n### Expected behavior\r\n\r\nNo errors with imports when using `babel-loader` with `ts-loader` and RHL.\r\n\r\n### Actual behavior\r\n\r\nSyntax errors caused by imports\r\n\r\n### Environment\r\n\r\nReact Hot Loader version: next (`4.0.0-beta.11`)\r\n\r\nRun these commands in the project folder and fill in their results:\r\n\r\n1. `node -v`: `8.9.3`\r\n2. `npm -v`: `5.5.1`\r\n\r\nThen, specify:\r\n\r\n1. Operating system: macOS 10.12.6\r\n2. Browser and version: Safari 11.0.2 (12604.4.7.1.4)\r\n\r\n### Reproducible Demo\r\n\r\nhttps://github.com/DevanB/typescript-react-starters/tree/rhl/ts-react\r\n\r\n(Notice the `rhl` branch)"},"comment":{"url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/comments/354570029","html_url":"https://github.com/gaearon/react-hot-loader/issues/760#issuecomment-354570029","issue_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/760","id":354570029,"user":{"login":"neoziro","id":266302,"avatar_url":"https://avatars2.githubusercontent.com/u/266302?v=4","gravatar_id":"","url":"https://api.github.com/users/neoziro","html_url":"https://github.com/neoziro","followers_url":"https://api.github.com/users/neoziro/followers","following_url":"https://api.github.com/users/neoziro/following{/other_user}","gists_url":"https://api.github.com/users/neoziro/gists{/gist_id}","starred_url":"https://api.github.com/users/neoziro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neoziro/subscriptions","organizations_url":"https://api.github.com/users/neoziro/orgs","repos_url":"https://api.github.com/users/neoziro/repos","events_url":"https://api.github.com/users/neoziro/events{/privacy}","received_events_url":"https://api.github.com/users/neoziro/received_events","type":"User","site_admin":false},"created_at":"2017-12-30T21:44:51Z","updated_at":"2017-12-30T21:44:51Z","author_association":"COLLABORATOR","body":"Yes it looks like it is a problem in Babel configuration but on our side we need to make a clear guide in README.\r\n\r\n@DevanB to solve your problem:\r\n\r\nAdd a `.babelrc`:\r\n\r\n```js\r\n{\r\n  \"presets\": [\"env\", \"react\"],\r\n  \"plugins\": [\"react-hot-loader/babel\"]\r\n}\r\n```\r\n\r\nInstall \"babel-preset-env\" and \"babel-preset-react\".\r\n\r\nYou can take some inspiration from our [TypeScript example](https://github.com/gaearon/react-hot-loader/tree/next/examples/typescript)."}}
{"actor":{"display_login":"neoziro"}}