Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making babel to use the babelrc file if we find it
Summary: This PR tells babel where the babelrc file is if it has been found in the project root. I know you guys are relying on babel to find it when you tell babel the filename and sourceFilename, this works fine in normal js/node projects, here is an example where this will not work. We have a big repo that can contain a few react-native / js projects. Our build system is similar to BUCK and we keep our third party dependencies in a separate folder (having a global package.json at the project route is not feasible as everyone will have to install every apps dependencies even when they don't need them), the structure looks a bit like this: `third_party/js/.` packages from node_modules `common/js/` common code used by numerous apps, common components, services etc. `my_app/native` the app What's happening is something from `my_app/native` (where the .babelrc file is) is requiring something from `common/js` which is then requiring something from `third_party/js` and so babel has no idea what .babelrc file to use and Closes #8131 Differential Revision: D4167844 Pulled By: hramos fbshipit-source-id: 3569981e26ff8f8c632d8ae365a1f43a3483b13b
- Loading branch information