Fix __webpack_public_path__ for 1.11 (#11907)
Fixes: https://github.com/go-gitea/gitea/issues/11839
This commit is contained in:
parent
f79a2e193f
commit
313ace93d0
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
||||||
const { StaticUrlPrefix } = window.config;
|
const { StaticUrlPrefix } = window.config;
|
||||||
|
|
||||||
if (StaticUrlPrefix) {
|
if (StaticUrlPrefix) {
|
||||||
__webpack_public_path__ = StaticUrlPrefix.endsWith('/') ? StaticUrlPrefix : `${StaticUrlPrefix}/`;
|
__webpack_public_path__ = `${StaticUrlPrefix.endsWith('/') ? StaticUrlPrefix : `${StaticUrlPrefix}/`}js`;
|
||||||
} else if (document.currentScript && document.currentScript.src) {
|
} else if (document.currentScript && document.currentScript.src) {
|
||||||
const url = new URL(document.currentScript.src);
|
const url = new URL(document.currentScript.src);
|
||||||
__webpack_public_path__ = `${url.pathname.replace(/\/[^/]*$/, '')}/`;
|
__webpack_public_path__ = `${url.pathname.replace(/\/[^/]*$/, '')}/`;
|
||||||
|
|
Reference in a new issue