{"action":"opened","issue":{"url":"https://api.github.com/repos/babel/babelify/issues/165","labels_url":"https://api.github.com/repos/babel/babelify/issues/165/labels{/name}","comments_url":"https://api.github.com/repos/babel/babelify/issues/165/comments","events_url":"https://api.github.com/repos/babel/babelify/issues/165/events","html_url":"https://github.com/babel/babelify/issues/165","id":122400145,"number":165,"title":"Add only option to readme","user":{"login":"davidchase","id":490291,"avatar_url":"https://avatars.githubusercontent.com/u/490291?v=3","gravatar_id":"","url":"https://api.github.com/users/davidchase","html_url":"https://github.com/davidchase","followers_url":"https://api.github.com/users/davidchase/followers","following_url":"https://api.github.com/users/davidchase/following{/other_user}","gists_url":"https://api.github.com/users/davidchase/gists{/gist_id}","starred_url":"https://api.github.com/users/davidchase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidchase/subscriptions","organizations_url":"https://api.github.com/users/davidchase/orgs","repos_url":"https://api.github.com/users/davidchase/repos","events_url":"https://api.github.com/users/davidchase/events{/privacy}","received_events_url":"https://api.github.com/users/davidchase/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-16T00:32:36Z","updated_at":"2015-12-16T00:32:36Z","closed_at":null,"body":"In the section talking about `package.json` transforms:\r\n> Why aren't files in node_modules being transformed?\r\n\r\nI think it may help to add the `only` option to `node_modules` it seems like without it the transform doesn't not work on files in directories within the `node_modules` directory\r\n\r\nFor example my directory:\r\n\r\n`/src/node_modules/app/lib/package.json`\r\n\r\nwithout the only option set like so:\r\n```js\r\n{\r\n  \"browserify\": {\r\n    \"transform\": [[\"babelify\", { \"presets\": [\"es2015\"], \"only\": \"node_modules\" }]]\r\n  }\r\n}\r\n```\r\n\r\nmy `const` didn't transpile to `vars`... im not 100% but it seems the issue my lie in [here](https://github.com/babel/babel/blob/master/packages/babel-register/src/node.js#L92-L93)\r\n\r\nthoughts?"}}