Skip to content

fix: fixed packaging - #44

Merged
gitsad merged 2 commits into
mainfrom
fix/rn-renderer-packaging
Jul 7, 2026
Merged

fix: fixed packaging#44
gitsad merged 2 commits into
mainfrom
fix/rn-renderer-packaging

Conversation

@gitsad

@gitsad gitsad commented Jul 7, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Fixes a package-distribution bug that made three published packages unresolvable in React Native / Metro bundlers that don't opt into package exports resolution — notably Metro/Snackager (Expo Snack), which failed with Failed to resolve dependency … (Can't resolve '').

@mobile-reality/mdma-spec, @mobile-reality/mdma-runtime, and @mobile-reality/mdma-renderer-react-native previously exposed only an exports map (import + types), with no main/module/react-native entry fields. Bundlers that resolve the classic main/react-native fields (Metro without unstable_enablePackageExports, Snackager) found no entry point.

This adds main, module, and react-native fields (and a default export condition) alongside the existing exports — fully additive and backwards-compatible. Bundlers that read exports are unaffected; those that read main/react-native now resolve a valid entry. Side benefit: consumers no longer need unstable_enablePackageExports in their Metro config to use these packages.

Closes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing behavior to change)
  • Refactor (no functional change)
  • Documentation
  • CI / tooling

Packages Affected

  • @mobile-reality/mdma-spec
  • @mobile-reality/mdma-runtime
  • @mobile-reality/mdma-renderer-react-native (not in the list above; patch bump)

Checklist

  • I have read the CONTRIBUTING guide.
  • My code follows the existing code style (pnpm format and pnpm lint pass).
  • I have added or updated tests that cover my changes. (N/A — package-metadata change only; no runtime code changed.)
  • All tests pass (pnpm test).
  • Type-checking passes (pnpm typecheck). (Repo-wide: 22/22 packages.)
  • I have added a changeset (pnpm changeset) if this change affects published packages. (patch × 3.)
  • New or changed MDMA schemas are backwards-compatible (or marked as breaking). (No schema changes.)
  • Sensitive fields are marked with sensitive: true where appropriate. (N/A.)

@gitsad
gitsad merged commit de74e03 into main Jul 7, 2026
1 check passed
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.

2 participants