2018-01-07 00:51:25 +01:00
|
|
|
import { init } from 'sapper/runtime.js';
|
|
|
|
|
2018-01-08 08:00:15 +01:00
|
|
|
// polyfills
|
|
|
|
Promise.all([
|
2018-01-08 08:02:25 +01:00
|
|
|
typeof URLSearchParams === 'undefined' && import(/* webpackChunkName: 'url-search-params' */ 'url-search-params').then(Params => {
|
2018-01-08 08:00:15 +01:00
|
|
|
window.URLSearchParams = Params
|
|
|
|
Object.defineProperty(window.URL.prototype, 'searchParams', {
|
|
|
|
get() {
|
|
|
|
return new Params(this.search)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
]).then(() => {
|
|
|
|
// `routes` is an array of route objects injected by Sapper
|
|
|
|
init(document.querySelector('#sapper'), __routes__)
|
|
|
|
})
|