Adjust polyfills to support Safari on iOS 5.1.1 (ie iPad 1)

Just load them directly instead of dynamically importing because this
version doesn't seem to support promises natively
This commit is contained in:
Adam Goldsmith 2022-06-28 18:08:52 -04:00
parent 48fefb326f
commit b8ce38ce71
2 changed files with 10 additions and 10 deletions

View File

@ -1,7 +1,8 @@
{ {
"browserslist": [ "browserslist": [
"defaults", "defaults",
"ios 8.4" "ios 8.4",
"ios 5.1"
], ],
"scripts": { "scripts": {
"start": "npm run serve", "start": "npm run serve",

View File

@ -1,3 +1,10 @@
import 'core-js/stable/url';
import 'core-js/stable/function';
import Intl from 'intl';
import 'intl/locale-data/jsonp/en.js';
window.Intl = Intl;
import { Calendar, CalendarOptions } from '@fullcalendar/core'; import { Calendar, CalendarOptions } from '@fullcalendar/core';
import iCalendarPlugin from '@fullcalendar/icalendar'; import iCalendarPlugin from '@fullcalendar/icalendar';
import resourceTimeGridPlugin from '@fullcalendar/resource-timegrid'; import resourceTimeGridPlugin from '@fullcalendar/resource-timegrid';
@ -94,12 +101,4 @@ function main() {
window.setInterval(refresh, 5 * 60 * 1000); window.setInterval(refresh, 5 * 60 * 1000);
} }
if (!window.Intl) { main();
// No `Intl`, so use and load the polyfill.
import('intl').then((intl) => {
window.Intl = intl;
import('intl/locale-data/jsonp/en.js').then((_) => main());
});
} else {
main();
}