From d12d4f56a61638723f2ea7ff20bb7564dccbee3c Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 11 Dec 2025 14:40:32 +0200 Subject: [PATCH] force esm version of unicode-segmenter on web --- webpack.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index 7f58a7448a..866ff1a3ba 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -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 || []),