Files
Rubén Norte af3a6519b3 Fix Fantom REPL crash from metro default import (#57443)
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
2026-07-06 04:29:55 -07:00
..
…