Convert from Webpack to Vite (#34450)
Co-authored-by: Renaud Chaput <renchap@gmail.com>
This commit is contained in:
parent
a5a2c6dc7e
commit
c4f47adb49
100 changed files with 2031 additions and 7424 deletions
|
@ -2,10 +2,13 @@
|
|||
// If there are no polyfills, then this is just Promise.resolve() which means
|
||||
// it will execute in the same tick of the event loop (i.e. near-instant).
|
||||
|
||||
// eslint-disable-next-line import/extensions -- This file is virtual so it thinks it has an extension
|
||||
import 'vite/modulepreload-polyfill';
|
||||
|
||||
import { loadIntlPolyfills } from './intl';
|
||||
|
||||
function importExtraPolyfills() {
|
||||
return import(/* webpackChunkName: "extra_polyfills" */ './extra_polyfills');
|
||||
return import('./extra_polyfills');
|
||||
}
|
||||
|
||||
export function loadPolyfills() {
|
||||
|
|
|
@ -54,11 +54,9 @@ async function loadIntlPluralRulesPolyfills(locale: string) {
|
|||
return;
|
||||
}
|
||||
// Load the polyfill 1st BEFORE loading data
|
||||
await import('@formatjs/intl-pluralrules/polyfill-force');
|
||||
await import(
|
||||
/* webpackChunkName: "i18n-pluralrules-polyfill" */ '@formatjs/intl-pluralrules/polyfill-force'
|
||||
);
|
||||
await import(
|
||||
/* webpackChunkName: "i18n-pluralrules-polyfill-[request]" */ `@formatjs/intl-pluralrules/locale-data/${unsupportedLocale}`
|
||||
`../../../../node_modules/@formatjs/intl-pluralrules/locale-data/${unsupportedLocale}.js`
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -70,11 +68,9 @@ async function loadIntlPluralRulesPolyfills(locale: string) {
|
|||
// }
|
||||
// // Load the polyfill 1st BEFORE loading data
|
||||
// await import(
|
||||
// /* webpackChunkName: "i18n-relativetimeformat-polyfill" */
|
||||
// '@formatjs/intl-relativetimeformat/polyfill-force'
|
||||
// );
|
||||
// await import(
|
||||
// /* webpackChunkName: "i18n-relativetimeformat-polyfill-[request]" */
|
||||
// `@formatjs/intl-relativetimeformat/locale-data/${unsupportedLocale}`
|
||||
// );
|
||||
// }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue