Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose unstable_InspectorProxy and unstable_Device from dev-middleware (
facebook#41370) Summary: Recently, both `metro-inspector-proxy`(facebook#39045) and `react-native-community/cli-plugin-metro`(facebook#38795) were moved to this repo and in the process of moving these packages, the `exports` field inside package.json was added, only exporting the `index.js` file. The problem is that Expo CLI (and possibly other community packages) rely on functions and classes that are not exported in the `index.js` file, e.g. Importing the InspectorProxy class from `react-native/dev-middleware/dist/inspector-proxy/InspectorProxy`. Normally this wouldn't be a problem and we would just import from `dist/` but due to the `exports` field, attempting to import from any other file not specified on this field will result in a `ERR_PACKAGE_PATH_NOT_EXPORTED` error. As a short-term fix, we should create `unstable_`-prefixed exports of individual features Expo currently depends on. ## Changelog: [INTERNAL] [CHANGED] - Expose unstable_InspectorProxy and unstable_Device from `react-native/dev-middleware` Pull Request resolved: facebook#41370 Test Plan: N / A Reviewed By: robhogan Differential Revision: D51163134 Pulled By: blakef fbshipit-source-id: e67adaedc4fc64131e4c9dd8383c9877b8202283
- Loading branch information