-
Notifications
You must be signed in to change notification settings - Fork 974
Description
🐛 Bug Report
After the upgrade of React Native to 72.3, Metro to 0.76.7, and UI Kitten to 2.2.0, the following metro.config.js content doesn't integrate the custom mapping anymore.
// Reference: https://akveo.github.io/react-native-ui-kitten/docs/guides/improving-performance#improving-performance
const { getDefaultConfig } = require("@react-native/metro-config");
const evaMetroConfig = require("@ui-kitten/metro-config");
const evaConfig = {
evaPackage: "@eva-design/eva",
customMappingPath: "./app/theme/customMapping.json",
};
module.exports = evaMetroConfig.create(evaConfig, getDefaultConfig(__dirname));
The following was previously working with React Native 70.6, UI Kitten 2.1.1 and Metro 0.72.3
The bundle message: success Successfully bootstrapped @eva-design/eva is not displayed anymore as well.
As a workaround, the command: yarn ui-kitten bootstrap @eva-design/eva ./app/theme/customMapping.json still works
When looking deeper and debugging locally, it appeared that the metro function injected into reporter: { update: <method> } is never run, and thus never runs the eva bootstrapservice.run() method which create the generate.json file used for theming.
To Reproduce
Steps to reproduce the behavior:
- Using a react native project with the above configuration
- using a custom mapped them value in the project.
- The value is not taken in account
Link to runnable example or repository (highly encouraged)
Minimal app with the bug reproduced: https://github.com/Bertram25/minimal-ui-kitten-app
UI Kitten and Eva version
| Package | Version |
|---|---|
| @eva-design/eva | 2.2.0 |
| @ui-kitten/components | 5.3.1 |
Environment information
npx envinfo --preset react-native
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
Binaries:
Node: 16.14.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.5.0 - C:\Program Files\nodejs\npm.CMD
npmPackages:
react: 18.2.0 => 18.2.0
react-native: 0.72.3 => 0.72.3