akveo / akveo/react-native-ui-kitten
Turning on metro config for custom mapping breaking console logging
- 主要言語
- TypeScript
- スター
- 10.7k
- フォーク
- 962
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
## 🐛 Bug Report
After activating MetroConfig.create in metro.config.js for custom mapping, logger breaks and nothing logged to console, may be other features of metro disabling as well. That happens when I'm trying to mix evaDesign config with svg setup for react-native svg.
Also default setup for Metro-config by ui-kitten throws warnings in console:
## To Reproduce
1. Add ui-kitten and react-native svg babel transformer
2. edit metro.config.js to look like:
```js
const { getDefaultConfig } = require('metro-config');
const MetroConfig = require('@ui-kitten/metro-config');
const evaConfig = {
evaPackage: '@eva-design/eva',
// Optional, but may be useful when using mapping customization feature.
customMappingPath: './src/consts/mapping.json',
};
module.exports = (async () => {
const {
resolver: { sourceExts, assetExts },
} = await getDefaultConfig(__dirname);
const config = {
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
resolver: {
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
},
};
return MetroConfig.create(evaConfig, config);
})();
```
## Expected behavior
Expected to metro working same as before implementing ui-kitten
## UI Kitten and Eva version
| Package | Version |
| ----------- | ----------- |
| @eva-design/eva | 2.2.0 |
| @ui-kitten/components | 5.3.1 |
## Environment information
```bash
System:
OS: macOS 13.4
CPU: (12) arm64 Apple M2 Pro
Binaries:
Node: 20.0.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 9.6.4 - /opt/homebrew/bin/npm
Watchman: 2023.05.01.00 - /opt/homebrew/bin/watchman
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
Android SDK:
API Levels: 31, 33
Build Tools: 30.0.2, 30.0.3, 31.0.0, 33.0.0, 33.0.2
System Images: android-33 | Google APIs ARM 64 v8a
IDEs:
Android Studio: Flamingo 2022.2.1 Patch 1 Flamingo 2022.2.1 Patch 1
Xcode: 14.3/14E222b - /usr/bin/xcodebuild
npmPackages:
react: 18.2.0 => 18.2.0
react-native: 0.71.8 => 0.71.8
```
コントリビューションガイド
評価
この issue はまだ評価されていません。