From 4545cbf0dd6a2e87c6814d5228e25170bb452992 Mon Sep 17 00:00:00 2001 From: SilenceLurker Date: Sun, 8 Feb 2026 18:05:03 +0800 Subject: [PATCH] update Module --- SL/module/Module.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); }