{"action":"created","issue":{"url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/838","repository_url":"https://api.github.com/repos/gaearon/react-hot-loader","labels_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/838/labels{/name}","comments_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/838/comments","events_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/838/events","html_url":"https://github.com/gaearon/react-hot-loader/issues/838","id":293791488,"number":838,"title":"[v4] Breaks if you define `require` somewhere","user":{"login":"kentor","id":240493,"avatar_url":"https://avatars1.githubusercontent.com/u/240493?v=4","gravatar_id":"","url":"https://api.github.com/users/kentor","html_url":"https://github.com/kentor","followers_url":"https://api.github.com/users/kentor/followers","following_url":"https://api.github.com/users/kentor/following{/other_user}","gists_url":"https://api.github.com/users/kentor/gists{/gist_id}","starred_url":"https://api.github.com/users/kentor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentor/subscriptions","organizations_url":"https://api.github.com/users/kentor/orgs","repos_url":"https://api.github.com/users/kentor/repos","events_url":"https://api.github.com/users/kentor/events{/privacy}","received_events_url":"https://api.github.com/users/kentor/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-02-02T06:59:10Z","updated_at":"2018-03-14T22:04:39Z","closed_at":"2018-02-02T09:50:46Z","author_association":"NONE","body":"### Description\r\n\r\nIf you define `require` anywhere in your code (to something not a function specifically), this breaks the page with a `_require` is not a function error.\r\n\r\nThis happens when compiling with webpack with the `react-hot-reload/babel` plugin in `.babelrc`.\r\n\r\n### Expected behavior\r\n\r\nTo not break\r\n\r\n### Actual behavior\r\n\r\nGet `Uncaught TypeError: _require is not a function`\r\n\r\n### Environment\r\n\r\nReact Hot Loader version: 4.0.0-beta.18\r\n\r\nRun these commands in the project folder and fill in their results:\r\n\r\n1. `node -v`: 8.9.0\r\n2. `npm -v`: 5.5.1\r\n\r\n### Reproducible Demo\r\n\r\nCheck out this branch:\r\n\r\nhttps://github.com/kentor/react-boilerplate/tree/react-hot-loader-4.0\r\n\r\nrun `yarn` and `npm start`. Go to `localhost:10000` and open console to see error.\r\n\r\nThis causes the issue:\r\n\r\nhttps://github.com/kentor/react-boilerplate/commit/92a3b2265411dcc61169f8616b50275575e1caf2"},"comment":{"url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/comments/373190450","html_url":"https://github.com/gaearon/react-hot-loader/issues/838#issuecomment-373190450","issue_url":"https://api.github.com/repos/gaearon/react-hot-loader/issues/838","id":373190450,"user":{"login":"idan","id":22723,"avatar_url":"https://avatars0.githubusercontent.com/u/22723?v=4","gravatar_id":"","url":"https://api.github.com/users/idan","html_url":"https://github.com/idan","followers_url":"https://api.github.com/users/idan/followers","following_url":"https://api.github.com/users/idan/following{/other_user}","gists_url":"https://api.github.com/users/idan/gists{/gist_id}","starred_url":"https://api.github.com/users/idan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idan/subscriptions","organizations_url":"https://api.github.com/users/idan/orgs","repos_url":"https://api.github.com/users/idan/repos","events_url":"https://api.github.com/users/idan/events{/privacy}","received_events_url":"https://api.github.com/users/idan/received_events","type":"User","site_admin":false},"created_at":"2018-03-14T22:04:38Z","updated_at":"2018-03-14T22:04:38Z","author_association":"NONE","body":"OK, solved! This was totally my fault.\r\n\r\nMy config specified `module.noParse: /\\.min\\.js/,` 🤦‍♂️  because of some other library we include that is already minified.\r\n\r\nHence the `react-hot-loader.production.min.js` wasn't processed.\r\n\r\nThanks for the positive vibes! <3"}}
{"actor":{"display_login":"idan"}}