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:
parent
48fefb326f
commit
b8ce38ce71
@ -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",
|
||||||
|
15
src/index.ts
15
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 { 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) {
|
|
||||||
// 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();
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user