Skip to content

Commit

Permalink
fix(metro-serializer-esbuild): include ReactFabric-prod.js by defau…
Browse files Browse the repository at this point in the history
…lt (#2962)
  • Loading branch information
tido64 committed Feb 9, 2024
1 parent 8dcfd1e commit bb5ecf0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/itchy-chefs-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rnx-kit/metro-serializer-esbuild": patch
---

Include `ReactFabric-prod.js` by default
2 changes: 1 addition & 1 deletion packages/metro-serializer-esbuild/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Defaults to `hermes0.7.0`.
When enabled, includes Fabric-enabled version of React. You can save some bytes
by disabling this if you haven't migrated to Fabric yet.

Defaults to `false`.
Defaults to `true`.

### `drop`

Expand Down
2 changes: 1 addition & 1 deletion packages/metro-serializer-esbuild/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export function MetroSerializer(
// that we pass to `esbuild.build()` below. Since it doesn't work for
// some reason, we'll filter them out here instead.
if (
buildOptions?.fabric !== true &&
buildOptions?.fabric === false &&
args.path.endsWith("ReactFabric-prod.js")
) {
return { contents: "" };
Expand Down

0 comments on commit bb5ecf0

Please sign in to comment.