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

React native 0.57 #997

Closed
khrizt opened this issue Oct 25, 2018 · 1 comment
Closed

React native 0.57 #997

khrizt opened this issue Oct 25, 2018 · 1 comment

Comments

@khrizt
Copy link

khrizt commented Oct 25, 2018

Description

This is not an issue is just a comment, I'm using detox v9 with version 0.57 of react-native and everything I'm using works correctly. There's just one thing that I needed to change. The mocking react-native config needs to be changed as this react-native version includes a metro-bundler version bump. The only way to achieve the same effect as the previous version of rn-cli.config.js is this one:

const { getDefaultConfig } = require('metro-config');

const additionalExts = process.env.RN_SRC_EXT ? process.env.RN_SRC_EXT.split(',') : [];

module.exports = (async () => {
  const {
    resolver: { sourceExts },
  } = await getDefaultConfig();

  return {
    resolver: {
      sourceExts: [...additionalExts, ...sourceExts],
    },
  };
})();

In this new version of metro-bundler you need to specify all the extensions you want to use so you need to get the default extensions and add your own.

I think I got it all correct, and I'm open to testing additional things if needed.

Steps to Reproduce

Use detox v9 with react-native 0.57

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 9.0.5
  • React Native: 0.57.2
  • Node: 10
  • Device: android && ios
  • Xcode: 10
@LeoNatan
Copy link
Contributor

Hello, thank you for posting.

There is a PR that updates documentation with these instructions. We haven’t had time to test it yet, which is why it is open still.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants