I am trying to use babel-plugin-auto-import
to auto-import React
.
Here is my babel.config.js
:
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
[ 'auto-import', {
declarations: [
{ path: 'react', default: 'React', members: ['Component'] },
{ path: 'react-native', members: ['View', 'Text', 'Platform']},
]
}],
]
};
};
But this seems to conflict with an expo dependency:
/node_modules/expo/build/effects/BlurView.ios.js: You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a Identifier node without passing scope and parentPath.
It appears to conflict with BlurView.ios.js:2
:
import * as React from 'react';
How can I prevent the defined config from leaking into the dependencies?