mirror of
https://github.com/nolanlawson/pinafore
synced 2024-12-13 02:37:20 +01:00
21 lines
804 B
JavaScript
21 lines
804 B
JavaScript
import { init } from 'sapper/runtime.js'
|
|
import { offlineNotifiction } from '../routes/_utils/offlineNotification'
|
|
import { serviceWorkerClient } from '../routes/_utils/serviceWorkerClient'
|
|
|
|
import {
|
|
importURLSearchParams,
|
|
importIntersectionObserver,
|
|
importRequestIdleCallback,
|
|
importIndexedDBGetAllShim
|
|
} from '../routes/_utils/asyncModules'
|
|
|
|
// polyfills
|
|
Promise.all([
|
|
typeof URLSearchParams === 'undefined' && importURLSearchParams(),
|
|
typeof IntersectionObserver === 'undefined' && importIntersectionObserver(),
|
|
typeof requestIdleCallback === 'undefined' && importRequestIdleCallback(),
|
|
!IDBObjectStore.prototype.getAll && importIndexedDBGetAllShim()
|
|
]).then(() => {
|
|
// `routes` is an array of route objects injected by Sapper
|
|
init(document.querySelector('#sapper'), __routes__)
|
|
}) |