Bundle headless plugins

Summary: Current temporary limitations: all headless plugins are bundled with Flipper.

Reviewed By: antonk52

Differential Revision: D36098168

fbshipit-source-id: c58abe41776157258a5c39a80a5c1a33cf3f42c5
This commit is contained in:
Andrey Goncharov
2022-05-10 05:13:24 -07:00
committed by Facebook GitHub Bot
parent 1f2f799772
commit a6d7f98cfd
10 changed files with 84 additions and 11 deletions

View File

@@ -51,6 +51,7 @@ export function tryReplaceGlobalReactUsage(path: NodePath<Identifier>) {
if (
path.node.name === 'React' &&
(path.parentPath.node as any).id !== path.node &&
path.parent.type !== 'ObjectProperty' &&
!isReactImportIdentifier(path)
) {
path.replaceWith(identifier('global.React'));