pinafore/src/client.js

23 lines
789 B
JavaScript
Raw Normal View History

import * as sapper from '../__sapper__/client.js'
import './routes/_utils/serviceWorkerClient'
import './routes/_utils/historyEvents'
import './routes/_utils/loadingMask'
2019-07-21 22:31:26 +00:00
import './routes/_utils/forceOnline'
import { mark, stop } from './routes/_utils/marks'
import { loadPolyfills } from './routes/_utils/polyfills/loadPolyfills'
import { loadNonCriticalPolyfills } from './routes/_utils/polyfills/loadNonCriticalPolyfills'
import { idbReady } from './routes/_utils/idbReady'
2021-06-19 16:29:32 +00: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 (module.hot) {
module.hot.accept()
}