diff --git a/SL/module/Module.js b/SL/module/Module.js index b1951f4..a57379e 100644 --- a/SL/module/Module.js +++ b/SL/module/Module.js @@ -108,7 +108,11 @@ export class Module { return viewPath; } if (this.ctx && this.ctx.baseUrl) { - return new URL(viewPath, this.ctx.baseUrl).toString(); + const baseUrl = this.ctx.baseUrl; + const absoluteBase = /^(https?:)?\/\//.test(baseUrl) + ? baseUrl + : `${window.location.origin}/${String(baseUrl).replace(/^\/+/, '')}`; + return new URL(viewPath, absoluteBase).toString(); } return new URL(viewPath, import.meta.url).toString(); }