From dabcb166a9a0fba8dcbf2e11fe155c42b5eca678 Mon Sep 17 00:00:00 2001 From: hurali97 Date: Wed, 13 Mar 2024 18:15:31 +0500 Subject: [PATCH] perf: remove intl polyfills which are supported by hermes --- src/libs/IntlPolyfill/index.native.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/libs/IntlPolyfill/index.native.ts b/src/libs/IntlPolyfill/index.native.ts index ca1c8f4c250e..7a21ae26bfa4 100644 --- a/src/libs/IntlPolyfill/index.native.ts +++ b/src/libs/IntlPolyfill/index.native.ts @@ -1,18 +1,16 @@ -import polyfillDateTimeFormat from './polyfillDateTimeFormat'; import polyfillListFormat from './polyfillListFormat'; -import polyfillNumberFormat from './polyfillNumberFormat'; import type IntlPolyfill from './types'; /** * Polyfill the Intl API, always performed for native devices. */ const intlPolyfill: IntlPolyfill = () => { - // Native devices require extra polyfills - require('@formatjs/intl-getcanonicallocales/polyfill'); + // Native devices require extra polyfills which are + // not yet implemented in hermes. + // see support: https://hermesengine.dev/docs/intl/ + require('@formatjs/intl-locale/polyfill'); - require('@formatjs/intl-pluralrules/polyfill'); - polyfillNumberFormat(); - polyfillDateTimeFormat(); + polyfillListFormat(); };