{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babelify/issues/151","labels_url":"https://api.github.com/repos/babel/babelify/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/babel/babelify/issues/151/comments","events_url":"https://api.github.com/repos/babel/babelify/issues/151/events","html_url":"https://github.com/babel/babelify/issues/151","id":116413098,"number":151,"title":"babelrc is not read when using babelify","user":{"login":"kirbysayshi","id":90831,"avatar_url":"https://avatars.githubusercontent.com/u/90831?v=3","gravatar_id":"","url":"https://api.github.com/users/kirbysayshi","html_url":"https://github.com/kirbysayshi","followers_url":"https://api.github.com/users/kirbysayshi/followers","following_url":"https://api.github.com/users/kirbysayshi/following{/other_user}","gists_url":"https://api.github.com/users/kirbysayshi/gists{/gist_id}","starred_url":"https://api.github.com/users/kirbysayshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirbysayshi/subscriptions","organizations_url":"https://api.github.com/users/kirbysayshi/orgs","repos_url":"https://api.github.com/users/kirbysayshi/repos","events_url":"https://api.github.com/users/kirbysayshi/events{/privacy}","received_events_url":"https://api.github.com/users/kirbysayshi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-11T20:17:20Z","updated_at":"2015-11-16T18:32:31Z","closed_at":null,"body":"It appears that something is preventing babel from reading in the local .babelrc when running via babelify. Here is a gist that demonstrates the problem: https://gist.github.com/kirbysayshi/c0df1bf8bbbac53d0c1c\r\n\r\n```sh\r\n$ git clone https://gist.github.com/kirbysayshi/c0df1bf8bbbac53d0c1c babelify-test && cd babelify-test\r\n$ npm install\r\n...\r\n$ npm run js\r\n> babelify-test@0.0.0 js /private/tmp/babelify-test\r\n> browserify index.js -o bundle.js\r\n\r\n\r\n/private/tmp/babelify-test/index.js:1\r\nimport Promise from 'es6-promise';\r\n^\r\nParseError: 'import' and 'export' may appear only with 'sourceType: module'\r\n```\r\n\r\nIf I place the `presets` key within the package.json browserify config, then the code compiles just fine. I believe this worked before babel 6, so perhaps it's an upstream bug. Not sure."},"comment":{"url":"https://api.github.com/repos/babel/babelify/issues/comments/157129193","html_url":"https://github.com/babel/babelify/issues/151#issuecomment-157129193","issue_url":"https://api.github.com/repos/babel/babelify/issues/151","id":157129193,"user":{"login":"jmm","id":129203,"avatar_url":"https://avatars.githubusercontent.com/u/129203?v=3","gravatar_id":"","url":"https://api.github.com/users/jmm","html_url":"https://github.com/jmm","followers_url":"https://api.github.com/users/jmm/followers","following_url":"https://api.github.com/users/jmm/following{/other_user}","gists_url":"https://api.github.com/users/jmm/gists{/gist_id}","starred_url":"https://api.github.com/users/jmm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmm/subscriptions","organizations_url":"https://api.github.com/users/jmm/orgs","repos_url":"https://api.github.com/users/jmm/repos","events_url":"https://api.github.com/users/jmm/events{/privacy}","received_events_url":"https://api.github.com/users/jmm/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T18:32:31Z","updated_at":"2015-11-16T18:32:31Z","body":"I think it's a bit surprising for a browserify transform to read options from the file system (not counting `browserify.transform` in `package.json`). Do any others do that? Also, it isn't even documented for Babel that it'll read options from the file system when calling `.transform()` with an absolute `filename` opt: https://github.com/babel/babel.github.io/issues/539."}}