Pinafore-Web-Client-Frontend/src/client.js

23 lines
832 B
JavaScript
Raw Normal View History

import * as sapper from '../__sapper__/client.js'
import './routes/_utils/serviceWorkerClient.js'
import './routes/_utils/historyEvents.js'
import './routes/_utils/loadingMask.js'
import './routes/_utils/forceOnline.js'
import { mark, stop } from './routes/_utils/marks.js'
import { loadPolyfills } from './routes/_utils/polyfills/loadPolyfills.js'
import { loadNonCriticalPolyfills } from './routes/_utils/polyfills/loadNonCriticalPolyfills.js'
import idbReady from 'safari-14-idb-fix/dist/esm'
2021-06-19 18:29:32 +02:00
Promise.all([idbReady(), loadPolyfills()]).then(() => {
mark('sapperStart')
sapper.start({ target: document.querySelector('#sapper') })
stop('sapperStart')
/* no await */ loadNonCriticalPolyfills()
})
console.log('process.env.NODE_ENV', process.env.NODE_ENV)
if (import.meta.webpackHot) {
import.meta.webpackHot.accept()
}