2020-05-20 16:33:31 -06:00
|
|
|
// This sets up the URL prefix used in webpack's chunk loading.
|
|
|
|
// This file must be imported before any lazy-loading is being attempted.
|
|
|
|
const {StaticUrlPrefix} = window.config;
|
2019-11-17 14:39:06 -07:00
|
|
|
|
2020-05-20 16:33:31 -06:00
|
|
|
if (StaticUrlPrefix) {
|
|
|
|
__webpack_public_path__ = StaticUrlPrefix.endsWith('/') ? StaticUrlPrefix : `${StaticUrlPrefix}/`;
|
|
|
|
} else {
|
|
|
|
const url = new URL(document.currentScript.src);
|
|
|
|
__webpack_public_path__ = url.pathname.replace(/\/[^/]*?\/[^/]*?$/, '/');
|
|
|
|
}
|