force esm version of unicode-segmenter on web (#9532)

(cherry picked from commit 506bad83ba)
This commit is contained in:
Samuel Newman
2025-12-11 17:49:24 +02:00
committed by Eric Bailey
parent f105b22054
commit 04d08bebae
+4
View File
@@ -23,6 +23,10 @@ module.exports = async function (env, argv) {
config = withAlias(config, {
'react-native$': 'react-native-web',
'react-native-webview': 'react-native-web-webview',
// Force ESM version
'unicode-segmenter/grapheme': require
.resolve('unicode-segmenter/grapheme')
.replace(/\.cjs$/, '.js'),
})
config.module.rules = [
...(config.module.rules || []),