Skip to content

Commit

Permalink
Revert "[NoQA][Audit][Implementation] - Remove Intl Polyfills which a…
Browse files Browse the repository at this point in the history
…re supported by Hermes on native platforms"
  • Loading branch information
mountiny authored Mar 18, 2024
1 parent 4f2ec61 commit 9987894
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/libs/IntlPolyfill/index.native.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
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 which are
// not yet implemented in hermes.
// see support: https://hermesengine.dev/docs/intl/

// Native devices require extra polyfills
require('@formatjs/intl-getcanonicallocales/polyfill');
require('@formatjs/intl-locale/polyfill');

require('@formatjs/intl-pluralrules/polyfill');
polyfillNumberFormat();
polyfillDateTimeFormat();
polyfillListFormat();
};

Expand Down

0 comments on commit 9987894

Please sign in to comment.