Skip to content

Commit

Permalink
Merge pull request #38508 from Expensify/revert-38228-audit/app-start…
Browse files Browse the repository at this point in the history
…up/remove-intl-polyfills

[CP Staging] Revert "[NoQA][Audit][Implementation] - Remove Intl Polyfills which are supported by Hermes on native platforms"
  • Loading branch information
luacmartins authored Mar 18, 2024
2 parents 4f2ec61 + 9987894 commit 4d2ac68
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 4d2ac68

Please sign in to comment.