Skip to content
New issue

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

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

Already on GitHub? # to your account

not working in latest react native (fix) #19

Open
obsidianart opened this issue Jul 13, 2019 · 2 comments
Open

not working in latest react native (fix) #19

obsidianart opened this issue Jul 13, 2019 · 2 comments

Comments

@obsidianart
Copy link

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

@obsidianart obsidianart changed the title not working in latest react native not working in latest react native (fix) Jul 13, 2019
@parshap
Copy link
Owner

parshap commented Jul 14, 2019

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.

@obsidianart
Copy link
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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants