force resolve esm version of zod

This commit is contained in:
Samuel Newman
2026-05-12 19:46:07 +03:00
parent d9aae6c234
commit 8e1fef4ba6
3 changed files with 5 additions and 2 deletions
+3
View File
@@ -30,6 +30,9 @@ module.exports = async function (env, argv) {
'unicode-segmenter/grapheme': require
.resolve('unicode-segmenter/grapheme')
.replace(/\.cjs$/, '.js'),
// Force ESM version - zod's main/exports.require point to index.cjs which
// Expo's webpack config treats as a static asset, breaking `require('zod')`
zod$: require.resolve('zod').replace(/\.cjs$/, '.js'),
'react-native-gesture-handler': false, // RNGH should not be used on web, so let's cause a build error if it sneaks in
'@sentry-internal/replay': false, // not used, ~300kb of dead weight
})