Repository navigation
fix(expo): preserve config plugin resolution in packed builds - #4347
Closed
RobJacobson wants to merge 2 commits into
Closed
RobJacobson wants to merge 2 commits into
RobJacobson wants to merge 2 commits into
Conversation
- Restore the four reported source type imports through explicit declaration exports - Expose expression, style, symbol layer, map payload, and press event types publicly - Verify built and packed outputs with generated package metadata and dependency types - Cover private internal paths and Node runtime export rejection
- Disable Bob's strict ESM packaging metadata so legacy Expo resolvers find the root config plugin - Exercise legacy and current Expo plugin loaders and native/web Metro resolution against fresh npm archives - Share packed-artifact fixtures with the published type-export regression suite - Exclude generated library output from the general source type check
mfazekas
requested changes
Oct 13, 2026
mfazekas
left a comment
Contributor
There was a problem hiding this comment.
Thanks for digging into the resolver mechanism. The failure comes from Expo Tools still pinning @expo/config-plugins 4.1.5 (the current Expo CLI resolves our app.plugin.js fine), so I think the fix belongs in Expo Tools. I don't see much benefit in turning off bob's esm output, which is the create-react-native-library default, just to accommodate an outdated tool. Also, this branch carries #4346's type-export changes; those should stay in that PR.
Contributor
|
Closing this, sorry. We'd rather keep bob's esm output and see the plugin resolution fixed in Expo Tools. Thanks again for tracking down the mechanism. |
This branch was successfully deployed
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.
Description
Addresses config-plugin discovery failures reported in #4147 and #4286.
Bob’s generated
lib/module/package.jsoncauses the legacy Expo resolver to search forapp.plugin.jsinside that directory. It misses the root plugin and loads the React Native runtime entry, which fails in Node.Disable Bob’s strict ESM packaging metadata while retaining module output and Metro’s native/web selection. Add regression coverage against freshly built npm archives using both legacy and current Expo resolvers, plus Metro resolution for compiled and source entries.
Also exclude generated
lib/output from the general source type check. Copied native specs were resolving type imports against adjacent JavaScript with erased types.Depends on #4346. This branch currently includes its type-export commit, which the packed declaration-consumer checks build on.
Reproduction and regression results
Run
yarn jest __tests__/packageResolution.test.js --runInBand.ERR_MODULE_NOT_FOUNDforlib/module/Mapboxapp.plugin.js; registers Android/iOS modslib/filesCurrent Expo plugin discovery and the explicit
app.plugin.jsexport pass before and after.Validation
yarn build— passed.yarn type:checkafter the fresh build — passed.yarn test— lint passed with warnings; 27 suites and 182 tests passed, including packed declaration-consumer checks.git diff --check— passed.Native and web verification covers module resolution. Device runtime behavior was not exercised; #4286’s separate “module undefined” report remains unconfirmed.
Checklist
CONTRIBUTING.mdand.github/REPRODUCING.md.