I’m trying to get a project up and running with Relay Modern, and get the following error
The package at "node_modules/babel-plugin-relay/lib/getDocumentName.js" attempted to import the Node standard library module "path". It failed because React Native does not include the Node standard library. Read more at https://docs.expo.io/versions/latest/introduction/faq.html#can-i-use-nodejs-packages-with-expo
I’ve read the docs at https://docs.expo.io/versions/latest/introduction/faq#can-i-use-expo-with-relay , and my .babelrc looks like this
{
"presets": [
"babel-preset-expo",
{ "plugins": ["./node_modules/babel-plugin-relay"] }
],
"env": {
"development": {
"plugins": ["transform-react-jsx-source"]
}
}
}
I’ve gone through various docs on the Relay site and elsewhere, and nothing gets around this. Is there a particular Relay plugin, which is not babel-plugin-relay
, which avoids using Node standard library, which I should be using?