{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babylon/issues/28","repository_url":"https://api.github.com/repos/babel/babylon","labels_url":"https://api.github.com/repos/babel/babylon/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/babel/babylon/issues/28/comments","events_url":"https://api.github.com/repos/babel/babylon/issues/28/events","html_url":"https://github.com/babel/babylon/issues/28","id":153139505,"number":28,"title":"6.8.0 causes `Uncaught ReferenceError: require is not defined` errors","user":{"login":"EvNaverniouk","id":226640,"avatar_url":"https://avatars.githubusercontent.com/u/226640?v=3","gravatar_id":"","url":"https://api.github.com/users/EvNaverniouk","html_url":"https://github.com/EvNaverniouk","followers_url":"https://api.github.com/users/EvNaverniouk/followers","following_url":"https://api.github.com/users/EvNaverniouk/following{/other_user}","gists_url":"https://api.github.com/users/EvNaverniouk/gists{/gist_id}","starred_url":"https://api.github.com/users/EvNaverniouk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EvNaverniouk/subscriptions","organizations_url":"https://api.github.com/users/EvNaverniouk/orgs","repos_url":"https://api.github.com/users/EvNaverniouk/repos","events_url":"https://api.github.com/users/EvNaverniouk/events{/privacy}","received_events_url":"https://api.github.com/users/EvNaverniouk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-04T23:34:48Z","updated_at":"2016-06-22T16:55:11Z","closed_at":null,"body":"My project's babylon package upgraded to 6.8.0 today as a result of a devDependency of babel-core. As a result, some stuff broke.\r\n\r\nSpecifically in my app I do some dynamic babel parsing (ala. repl). So I import babel directly like this:\r\n\r\n```\r\nimport preset_es2015 from 'babel-preset-es2015';\r\nimport preset_react from 'babel-preset-react';\r\nimport preset_stage0 from 'babel-preset-stage-0';\r\nimport {transform} from 'babel-core';\r\n```\r\n\r\nIt seems this no longer works with 6.8.0 and results in the following error stack:\r\n\r\n![screen shot 2016-05-04 at 4 33 22 pm](https://cloud.githubusercontent.com/assets/226640/15032456/f24f649a-1215-11e6-8ac0-2a40f53cbab1.png)\r\n\r\nThe top-most item in the stack is `babylon/lib/index.js` failing on `var _parser = require(\"./parser\");`\r\n\r\nRolling back to `babylon@6.7.0` makes the errors go away.\r\n\r\nI looked through the 6.8.0 CHANGELOG for both babylon and babel-core and can't see any reason why this would be happening. Can you please advise?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/babel/babylon/issues/comments/227807264","html_url":"https://github.com/babel/babylon/issues/28#issuecomment-227807264","issue_url":"https://api.github.com/repos/babel/babylon/issues/28","id":227807264,"user":{"login":"loganfsmyth","id":132260,"avatar_url":"https://avatars.githubusercontent.com/u/132260?v=3","gravatar_id":"","url":"https://api.github.com/users/loganfsmyth","html_url":"https://github.com/loganfsmyth","followers_url":"https://api.github.com/users/loganfsmyth/followers","following_url":"https://api.github.com/users/loganfsmyth/following{/other_user}","gists_url":"https://api.github.com/users/loganfsmyth/gists{/gist_id}","starred_url":"https://api.github.com/users/loganfsmyth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loganfsmyth/subscriptions","organizations_url":"https://api.github.com/users/loganfsmyth/orgs","repos_url":"https://api.github.com/users/loganfsmyth/repos","events_url":"https://api.github.com/users/loganfsmyth/events{/privacy}","received_events_url":"https://api.github.com/users/loganfsmyth/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T16:55:11Z","updated_at":"2016-06-22T16:55:11Z","body":"Sorry, I left raised this on out internal chat when you originally filed this, but it appears I forgot to comment here, woops!\r\n\r\nThis is because we accidentally didn't transition over our scripts to bundle Babylon together into a single file. Pre-6.8.x, Babylon was processed with `browserify` before being published, which meant that it didn't actually have any `require` calls in it, but also meant that Webpack complains when trying to package it.\r\n\r\nYou likely have `noParse: /babylon/` in your webpack config to tell webpack to not complain, but that also means that webpack will not walk through the file looking for `require` calls. Then we released `6.8` without the browserify bundling, which means we started having `require` calls again.\r\n\r\nWe either need to add the browserify bundling back in, or if we decide we don't want that, you should remove `noParse` from your config. I wouldn't recommend doing that until we make a call on whether to add Browserify again on our end though."}}
{"actor":{"display_login":"loganfsmyth"}}