2020-05-20 22:33:31 +00: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.
|
2021-05-08 14:27:25 +00:00
|
|
|
const {AssetUrlPrefix} = window.config;
|
2019-11-17 21:39:06 +00:00
|
|
|
|
2021-05-08 14:27:25 +00:00
|
|
|
if (AssetUrlPrefix) {
|
|
|
|
__webpack_public_path__ = AssetUrlPrefix.endsWith('/') ? AssetUrlPrefix : `${AssetUrlPrefix}/`;
|
2020-05-20 22:33:31 +00:00
|
|
|
} else {
|
|
|
|
const url = new URL(document.currentScript.src);
|
|
|
|
__webpack_public_path__ = url.pathname.replace(/\/[^/]*?\/[^/]*?$/, '/');
|
|
|
|
}
|