2020-03-11 15:34:54 -04:00
|
|
|
// This sets up webpack's chunk loading to load resources from the 'public'
|
|
|
|
// directory. This file must be imported before any lazy-loading is being attempted.
|
2019-11-17 16:39:06 -05:00
|
|
|
|
|
|
|
if (document.currentScript && document.currentScript.src) {
|
|
|
|
const url = new URL(document.currentScript.src);
|
2020-01-25 03:41:34 -05:00
|
|
|
__webpack_public_path__ = url.pathname.replace(/\/[^/]*?\/[^/]*?$/, '/');
|
2019-11-17 16:39:06 -05:00
|
|
|
} else {
|
|
|
|
// compat: IE11
|
|
|
|
const script = document.querySelector('script[src*="/index.js"]');
|
2020-01-25 03:41:34 -05:00
|
|
|
__webpack_public_path__ = script.getAttribute('src').replace(/\/[^/]*?\/[^/]*?$/, '/');
|
2019-11-17 16:39:06 -05:00
|
|
|
}
|