Skip to content

Adding windows to a project breaks Metro configuration for other platforms #4081

Closed
@kmelmon

Description

@kmelmon

This is an issue for customers that are building apps that target more platforms than just Windows.

To repro:
-Create an app using the CLI (react-native init)
-Add Windows support to this project (by installing rnpm-plugin-windows and running react-native windows).

At this point the project will no longer work correctly for Android.

The problem here is that installing windows overwrites metro.config.js with a custom configuration that only works on Windows. Unfortunately this is the only real option at the moment for react-native-windows, as the windows implementation needs to override core JS functionality, and metro doesn't have a better way for out-of-tree platforms to do this.

We're tracking proposing a solution in metro itself to solve this. See: react-native-community/discussions-and-proposals#182

This bug is tracking resolving this for react-native-windows.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions