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