From b8ce38ce71ffa7a0aae8d43594e812273775adab Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Tue, 28 Jun 2022 18:08:52 -0400 Subject: [PATCH] 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 --- package.json | 3 ++- src/index.ts | 17 ++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 4088949..3711d15 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { "browserslist": [ "defaults", - "ios 8.4" + "ios 8.4", + "ios 5.1" ], "scripts": { "start": "npm run serve", diff --git a/src/index.ts b/src/index.ts index bc765d4..6eb1729 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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 iCalendarPlugin from '@fullcalendar/icalendar'; import resourceTimeGridPlugin from '@fullcalendar/resource-timegrid'; @@ -94,12 +101,4 @@ function main() { window.setInterval(refresh, 5 * 60 * 1000); } -if (!window.Intl) { - // 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(); -} +main();