Finish ESM transition, move to composite builds, detangle type refs, and re-enable macos PR pipeline#4124
Open
JasonVMo wants to merge 13 commits into
Open
Finish ESM transition, move to composite builds, detangle type refs, and re-enable macos PR pipeline#4124JasonVMo wants to merge 13 commits into
JasonVMo wants to merge 13 commits into
Conversation
…tive into user/jasonvmo/esm
…ypes in include tree
Saadnajmi
reviewed
Jun 12, 2026
| "build": "fluentui-scripts build", | ||
| "build-cjs": "tsgo --outDir lib-commonjs", | ||
| "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler", | ||
| "build": "tsgo -b", |
Collaborator
There was a problem hiding this comment.
Was build really nothing e than just ts ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Platforms Impacted
Description of changes
This change has a number of things rolled together into one PR as one thing kind of led to another.
Move to ESM
The previous strategy of using module/moduleResolution: "nodenext" doesn't work to esm output on react native because if a module import as an extension (i.e.
import { foo } from "myFile.ts";) this will stop both metro and typescript from finding myFile.android.ts or other module suffixes. As a result:Composite builds
To speed up builds, and avoid race conditions for the lage builds where the file wasn't fully committed before the next tsgo instance tried to pick it up, I turned on project references and building with tsgo -b.
Type defragmentation
The massive parallelism of tsgo highlighted places where we were bringing in multiple versions of @types/react into the same package. The main sources were the icons package bringing in a @types/react-native: 0.68 package and the adapters package including rn, rnw, and rn-macos in the same build, each of which have rn -> react -> react types. Resolution in these cases can be order dependent and is a problem, these were all made more explicit.
Re-enable macos pipelines
This also attempts to enable the macos PR builds again as they were turned off in the recent 81 test app changeover.
Verification