Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[packager][breaking-change] Default enableBabelRCLookup (recursive) to false #15860

Closed
wants to merge 1 commit into from

Commits on Sep 8, 2017

  1. [packager][breaking-change] Default enableBabelRCLookup (recursive) t…

    …o false
    
    This is a breaking change that tells Metro to look at only the project's .babelrc file. Previously it would look at .babelrc files under node_modules and would run into issues because it didn't have the version of Babel nor the plugins/presets that `node_modules/randompackage/.babelrc` wanted. So as a workaround, people would write a postinstall step that deletes `node_modules/**/.babelrc`, which worked well. This flag (`getEnableBabelRCLookup = false`) has the same effect and hopefully fixes one source of cryptic bugs people run into.
    
    To use the old behavior, create a config file named `rn-cli.config.js` with:
    ```js
    module.exports = {
      getEnableBabelRCLookup() {
        return true;
      },
    };
    ```
    
    Test Plan: Go under node_modules, modify a used module to have a dummy .babelrc (`{"plugins": ["dummy"]}`) and ensure the JS bundle still loads.
    ide committed Sep 8, 2017
    Configuration menu
    Copy the full SHA
    d722247 View commit details
    Browse the repository at this point in the history