mirror of
https://github.com/react/react-native.git
synced 2026-09-28 13:23:09 +08:00
Summary: Pull Request resolved: https://github.com/react/react-native/pull/57443 The Fantom REPL (`yarn fantom-cli`) crashed on startup with `TypeError: Cannot read properties of undefined (reading 'loadConfig')`. `metro` is a CommonJS module that only provides named exports, so the default import `import Metro from 'metro'` resolves to `undefined` under the Babel interop used to run the REPL, and any access such as `Metro.loadConfig` throws. Switch to a namespace import (`import * as Metro from 'metro'`), matching how metro is already imported in the Fantom global setup. Changelog: [Internal] ___ Reviewed By: javache Differential Revision: D110754395 fbshipit-source-id: f1c7c415f96a6adeb6dde12919983aa9a5a819a4