Question
How I can redefine getEnableBabelRCLookup prop for metro bundler?
Why I need it
As I know, mertro bundler right now transpile all modules, including 3rd party libraries. But some of them already transpiled and has .babelrc config with presets and plugins, that no in dependencies. And when metro try to transpile such module, it throws error for unknown plugin, for example, lib @dump247/storybook-state:
error: bundling failed: ReferenceError: Unknown plugin "transform-react-remove-prop-types" specified in "C:\\GIT\\sandbox\\rn_0554\\node_modules\\@dump247\\storybook-state\\.babelrc" at 0, attempted to resolve relative to "C:\\GIT\\sandbox\\rn_0554\\node_modules\\@dump247\\storybook-state"
It is not good to install all missing plugins or presets, so I want to disable babelRCLookup.
What I've tried
I followed for Metro documentation.
Set metro.config.js in root of my project
export default {
enableBabelRCLookup: () => false
}
but it didn't work.
BTW doc is very poor :(
Versions
OS: Win10
Node: v8.9.4
NPM: v6.2.0
React Native: v0.55.4
Metro: v0.30.2
Question
How I can redefine
getEnableBabelRCLookupprop for metro bundler?Why I need it
As I know,
mertrobundler right now transpile all modules, including 3rd party libraries. But some of them already transpiled and has.babelrcconfig with presets and plugins, that no independencies. And whenmetrotry to transpile such module, it throws error for unknown plugin, for example, lib @dump247/storybook-state:It is not good to install all missing plugins or presets, so I want to disable
babelRCLookup.What I've tried
I followed for Metro documentation.
Set
metro.config.jsin root of my projectbut it didn't work.
BTW doc is very poor :(
Versions
OS: Win10
Node: v8.9.4
NPM: v6.2.0
React Native: v0.55.4
Metro: v0.30.2