mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-25 18:55:44 +03:00
Conditional import polyfill
This commit is contained in:
parent
531147cbc3
commit
427207ae5a
1 changed files with 5 additions and 1 deletions
|
@ -4,12 +4,16 @@ import './cloak-mode.css';
|
|||
|
||||
// Polyfill needed for Firefox < 122
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1423593
|
||||
import '@formatjs/intl-segmenter/polyfill';
|
||||
import { shouldPolyfill } from '@formatjs/intl-segmenter/should-polyfill';
|
||||
import { render } from 'preact';
|
||||
import { HashRouter } from 'react-router-dom';
|
||||
|
||||
import { App } from './app';
|
||||
|
||||
if (shouldPolyfill()) {
|
||||
import('@formatjs/intl-segmenter/polyfill-force');
|
||||
}
|
||||
|
||||
if (import.meta.env.DEV) {
|
||||
import('preact/debug');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue