Skip to content

not working in latest react native (fix) #19

Open

Description

@obsidianart

new rn-cli.js configuration

module.exports = {
  resolver: {
    extraNodeModules: require('node-libs-react-native'),
    blacklistRE: /react-native\/local-cli\/core\/__fixtures__.*/
  }
}

If this doesn't work try in metro.config.js

module.exports = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: false,
      },
    }),
  },
  resolver: {
    extraNodeModules: require('node-libs-react-native')
  }
};

To the mantainer: If you keep this alive I can pr on the docs

Activity

  1. changed the title [-]not working in latest react native[/-] [+]not working in latest react native (fix)[/+] on Jul 13, 2019
  2. parshap commented on Jul 14, 2019

    @parshap
    Owner

    Can you explain what doesn't work or why the transformer or blacklistRE options are relevant? If you want to send a PR to update the documentation to reference metro.config.js that would be great, but I don't think any of the additional options other than resolver.extraNodeModules are needed.

  3. obsidianart commented on Jul 15, 2019

    @obsidianart
    Author

    @parshap i agree but if they are needed for my app I can't test without. The main point is that 0.57 changed format for rn-cli but it didn't work either. I posted the full file just in case not to use it as it is.
    About what did't work, well, I don't know, I never got an error except the packages not being present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions