pinafore/routes/_utils/asyncModules.js
2018-01-17 00:06:24 -08:00

29 lines
790 B
JavaScript

const importURLSearchParams = () => import(
/* webpackChunkName: 'url-search-params' */ 'url-search-params'
).then(Params => {
window.URLSearchParams = Params
Object.defineProperty(window.URL.prototype, 'searchParams', {
get() {
return new Params(this.search)
}
})
})
const importTimeline = () => import(
/* webpackChunkName: 'Timeline' */ '../_components/Timeline.html'
).then(mod => mod.default)
const importIntersectionObserver = () => import(
/* webpackChunkname: 'intersection-observer' */ 'intersection-observer'
)
const importRequestIdleCallback = () => import(
/* webpackChunkName: 'requestidlecallback' */ 'requestidlecallback'
)
export {
importURLSearchParams,
importTimeline,
importIntersectionObserver,
importRequestIdleCallback
}