force resolve esm version of zod

This commit is contained in:
Samuel Newman
2026-05-12 19:46:07 +03:00
parent f4986138b7
commit 43bbdd840a
3 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -241,7 +241,7 @@
"tlds": "^1.234.0", "tlds": "^1.234.0",
"tldts": "^6.1.46", "tldts": "^6.1.46",
"unicode-segmenter": "^0.14.5", "unicode-segmenter": "^0.14.5",
"zod": "^3.20.2" "zod": "^3.25.76"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.26.0", "@babel/core": "^7.26.0",
+1 -1
View File
@@ -506,7 +506,7 @@ importers:
specifier: 0.14.5 specifier: 0.14.5
version: 0.14.5 version: 0.14.5
zod: zod:
specifier: ^3.20.2 specifier: ^3.25.76
version: 3.25.76 version: 3.25.76
devDependencies: devDependencies:
'@babel/core': '@babel/core':
+3
View File
@@ -30,6 +30,9 @@ module.exports = async function (env, argv) {
'unicode-segmenter/grapheme': require 'unicode-segmenter/grapheme': require
.resolve('unicode-segmenter/grapheme') .resolve('unicode-segmenter/grapheme')
.replace(/\.cjs$/, '.js'), .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 '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 '@sentry-internal/replay': false, // not used, ~300kb of dead weight
}) })