expo / snack

Expo Snack lets you run Expo in the browser.
https://snack.expo.dev
MIT License
356 stars 104 forks source link

fix: handle mjs and cjs files #593

Closed satya164 closed 1 month ago

satya164 commented 1 month ago

Currently snackager fails when bundling packages that contains .cjs or .mjs files. This PR updates the config to handle those extension.

In addition, it marks react/jsx-runtime as external as it fails to resolve while bundling @react-navigation/native and it's already provided by snack-runtime.

The new RC versions of @react-navigation/x packages use .cjs and .mjs file extensions to support ESM.