Skip to content

fix: remove mjs export for metro config#376

Merged
Brentlok merged 1 commit into
mainfrom
fix/metro-config-ts
Feb 11, 2026
Merged

fix: remove mjs export for metro config#376
Brentlok merged 1 commit into
mainfrom
fix/metro-config-ts

Conversation

@Brentlok

@Brentlok Brentlok commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

fixes #361

Summary by CodeRabbit

  • Chores
    • Updated package export configuration for the metro module.

@coderabbitai

coderabbitai Bot commented Feb 11, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Removed the "import" export field from the "./metro" entry in the package.json exports map, forcing ESM consumers to use the CommonJS build to resolve compatibility issues with ESM metro configurations.

Changes

Cohort / File(s) Summary
Package Exports Configuration
packages/uniwind/package.json
Removed the "import" field pointing to "./dist/metro/index.mjs" from the "./metro" export entry, leaving only "types" and "default" fields that reference the CommonJS build.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A metro path that caused us strife,
Now simplified, it works with life!
The ESM dreams must take a rest,
When CJS builds work the best.
Export exports, clean and bright,
The rabbit hops with pure delight! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing the MJS export for the metro config entry in package.json exports.
Linked Issues check ✅ Passed The PR directly addresses issue #361 by removing the 'import' field pointing to the MJS export, which resolves the ESM/CJS interop failure when Metro loads ESM configs.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to the required fix: removing the problematic MJS export from the metro entry in package.json, with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/metro-config-ts

No actionable comments were generated in the recent review. 🎉

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Brentlok Brentlok merged commit 9c2ca16 into main Feb 11, 2026
2 checks passed
@Brentlok Brentlok deleted the fix/metro-config-ts branch February 11, 2026 07:32
@coderabbitai coderabbitai Bot mentioned this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Build error when using uniwind/metro with esm metro config

1 participant