{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/8309","repository_url":"https://api.github.com/repos/babel/babel","labels_url":"https://api.github.com/repos/babel/babel/issues/8309/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/8309/comments","events_url":"https://api.github.com/repos/babel/babel/issues/8309/events","html_url":"https://github.com/babel/babel/issues/8309","id":340611862,"node_id":"MDU6SXNzdWUzNDA2MTE4NjI=","number":8309,"title":"Babel 7 ignores files outside of project directory","user":{"login":"petrdanecek","id":29194829,"node_id":"MDQ6VXNlcjI5MTk0ODI5","avatar_url":"https://avatars0.githubusercontent.com/u/29194829?v=4","gravatar_id":"","url":"https://api.github.com/users/petrdanecek","html_url":"https://github.com/petrdanecek","followers_url":"https://api.github.com/users/petrdanecek/followers","following_url":"https://api.github.com/users/petrdanecek/following{/other_user}","gists_url":"https://api.github.com/users/petrdanecek/gists{/gist_id}","starred_url":"https://api.github.com/users/petrdanecek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrdanecek/subscriptions","organizations_url":"https://api.github.com/users/petrdanecek/orgs","repos_url":"https://api.github.com/users/petrdanecek/repos","events_url":"https://api.github.com/users/petrdanecek/events{/privacy}","received_events_url":"https://api.github.com/users/petrdanecek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2018-07-12T12:13:47Z","updated_at":"2018-11-15T16:20:59Z","closed_at":null,"author_association":"NONE","body":"I think I'm missing something. I recently upgraded up to latest Babel 7 and got lot of issues related to my webpack configuration. I was able to solve all of them expect that I'm not able to import webpack.parts once they are outside of my project directory. I think my problem is related to below symptoms:\r\n\r\nthis doesn't work, babel ignores the content and nothing is \"transpiled\"\r\n`./node_modules/.bin/babel ../webpack.snippets.js `\r\n\r\nthis works fine - the file is transpiled properly\r\n`./node_modules/.bin/babel ./webpack.snippets.js `\r\n\r\nThe file content is very same. The babel ignores the files outside of my project dir.\r\n\r\nENVs:\r\nnode modules installed to my project dir\r\n`PATH_NODE=./node_modules`\r\n\r\n```\r\ncat .babelrc\r\n{\r\n  \"presets\": [\r\n    [\"@babel/preset-env\", {\"debug\": true}]\r\n  ]\r\n}\r\n```\r\n\r\nThe above results in below webpack problems. The main webpack.babel.js is in current project directory and imports ../webpack.snippets.js from outside \"shared\" directory.\r\nThe webpack process all imports properly from local webpack.babel.js which imports the outside located ../webpack.snippets.js . This results in failure:\r\n\r\n```\r\nwebpack.snippets.js:18\r\n\r\nimport path from 'path';\r\n^^^^^^\r\n\r\nSyntaxError: Unexpected token import\r\n```\r\n\r\n\r\nThe workaround is to copy the webpack.snippets.js to project folder locally, but I would like to share the webpack.snippets across more projects. The babel6 was working fine.\r\n\r\nI think I'm missing something in my babelrc file, but not sure.. any thoughts?"},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/439098860","html_url":"https://github.com/babel/babel/issues/8309#issuecomment-439098860","issue_url":"https://api.github.com/repos/babel/babel/issues/8309","id":439098860,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTA5ODg2MA==","user":{"login":"adityak74","id":5231288,"node_id":"MDQ6VXNlcjUyMzEyODg=","avatar_url":"https://avatars2.githubusercontent.com/u/5231288?v=4","gravatar_id":"","url":"https://api.github.com/users/adityak74","html_url":"https://github.com/adityak74","followers_url":"https://api.github.com/users/adityak74/followers","following_url":"https://api.github.com/users/adityak74/following{/other_user}","gists_url":"https://api.github.com/users/adityak74/gists{/gist_id}","starred_url":"https://api.github.com/users/adityak74/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adityak74/subscriptions","organizations_url":"https://api.github.com/users/adityak74/orgs","repos_url":"https://api.github.com/users/adityak74/repos","events_url":"https://api.github.com/users/adityak74/events{/privacy}","received_events_url":"https://api.github.com/users/adityak74/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T16:20:59Z","updated_at":"2018-11-15T16:20:59Z","author_association":"NONE","body":"Thanks for the help! I was little confused on how to use babelrcRoots maybe that should solve the issue. I will keep this thread posted. "}}
{"actor":{"display_login":"adityak74"}}