From dee8846a8010f41192facc51669414f035fb06c4 Mon Sep 17 00:00:00 2001 From: Weixuan Fu Date: Mon, 11 Mar 2024 15:26:02 +0800 Subject: [PATCH] fix entry abs path load input, not working in cloud gpu --- entry/entry.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/entry/entry.js b/entry/entry.js index 236df8a..16ab463 100644 --- a/entry/entry.js +++ b/entry/entry.js @@ -2,6 +2,7 @@ const targetNode = document.body; // Options for the observer (which mutations to observe) const config = { childList: true, subtree: true }; +const api_base = window.location.pathname.split("/").slice(0, -1).join("/"); // @ts-ignore const callback = function (mutationsList, observer) { @@ -11,7 +12,7 @@ const callback = function (mutationsList, observer) { mutation.addedNodes.forEach((node) => { if (node.nodeName === "CANVAS") { // @ts-ignore - import("/workspace_web/input.js"); + import(api_base + "/workspace_web/input.js"); observer.disconnect(); } });