{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babelify/issues/85","labels_url":"https://api.github.com/repos/babel/babelify/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/babel/babelify/issues/85/comments","events_url":"https://api.github.com/repos/babel/babelify/issues/85/events","html_url":"https://github.com/babel/babelify/issues/85","id":78563390,"number":85,"title":" babelify running on node_modules if an entry file is in node_modules","user":{"login":"AgentME","id":577345,"avatar_url":"https://avatars.githubusercontent.com/u/577345?v=3","gravatar_id":"","url":"https://api.github.com/users/AgentME","html_url":"https://github.com/AgentME","followers_url":"https://api.github.com/users/AgentME/followers","following_url":"https://api.github.com/users/AgentME/following{/other_user}","gists_url":"https://api.github.com/users/AgentME/gists{/gist_id}","starred_url":"https://api.github.com/users/AgentME/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgentME/subscriptions","organizations_url":"https://api.github.com/users/AgentME/orgs","repos_url":"https://api.github.com/users/AgentME/repos","events_url":"https://api.github.com/users/AgentME/events{/privacy}","received_events_url":"https://api.github.com/users/AgentME/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-20T15:12:00Z","updated_at":"2015-05-20T16:39:53Z","closed_at":null,"body":"Possibly a Browserify bug?\r\n\r\n```\r\n$ npm i browserify babel babelify lodash\r\n...\r\n$ echo \"import _ from 'lodash';\" > index.js\r\n$ ./node_modules/.bin/browserify -t babelify node_modules/babel/polyfill index.js -o out.js\r\n[BABEL] Note: The code generator has deoptimised the styling of \"/tmp/foo/node_modules/lodash/index.js\" as it exceeds the max of \"100KB\".\r\n```"},"comment":{"url":"https://api.github.com/repos/babel/babelify/issues/comments/103953088","html_url":"https://github.com/babel/babelify/issues/85#issuecomment-103953088","issue_url":"https://api.github.com/repos/babel/babelify/issues/85","id":103953088,"user":{"login":"zertosh","id":830952,"avatar_url":"https://avatars.githubusercontent.com/u/830952?v=3","gravatar_id":"","url":"https://api.github.com/users/zertosh","html_url":"https://github.com/zertosh","followers_url":"https://api.github.com/users/zertosh/followers","following_url":"https://api.github.com/users/zertosh/following{/other_user}","gists_url":"https://api.github.com/users/zertosh/gists{/gist_id}","starred_url":"https://api.github.com/users/zertosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zertosh/subscriptions","organizations_url":"https://api.github.com/users/zertosh/orgs","repos_url":"https://api.github.com/users/zertosh/repos","events_url":"https://api.github.com/users/zertosh/events{/privacy}","received_events_url":"https://api.github.com/users/zertosh/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T16:39:53Z","updated_at":"2015-05-20T16:39:53Z","body":"Ah, so because of [how](https://github.com/substack/module-deps/blob/f335ba8e240e42f328a41648efe2390b693dda39/index.js#L200-L208) browserify determines whether something is your module or not, by having one of your entries inside `node_modules`, it thinks everything there (excluding it's deps) are your files.\r\n\r\nI'm guessing that you want `node_modules/babel/polyfill` as an entry so that it auto-runs w/o you having to explicitly require it? If you're really keen on this, you can do:\r\n\r\n```sh\r\nbrowserify -t [ babelify --ignore node_modules ] node_modules/babel/polyfill index.js -o out.js\r\n```\r\n\r\nBut if you're not set on this pattern, you can always do:\r\n\r\n```\r\necho \"require('babel/polyfill'); import _ from 'lodash';\" > index.js\r\nbrowserify -t babelify index.js -o out.js\r\n```"}}