score:3

Accepted answer

babel-register ignores node_modules by default. You can set ignore:false in your .babelrc to disable that behavior. You could (probably should) also specify a more limited regular expression to avoid processing everything in node_modules.

See the docs: https://babeljs.io/docs/usage/require/

Your complete config should probably look something like this:


.babelrc

{
  "presets": ["react-native"],
  "ignore": false
}

package.json

{
  "ava": {
    "babel": "inherit"
  }
}

Related Query

More Query from same tag