Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

fix(pay): let the CDN loader import resolve in the browser instead of at build time

nirholasd9c11ec23973
diff --git a/public/pay/index.html b/public/pay/index.html
index d21d885d2..1597c51ef 100644
--- a/public/pay/index.html
+++ b/public/pay/index.html
@@ -1476,8 +1476,16 @@ function resetSteps() {
// outage, one corporate proxy or one ad blocker stalled the payment at "sign
// the transaction" with nothing on screen saying why. The error lands in the
// caller's catch, which paints the failed step and the chat error line.
+// The specifier is held in a variable, not written inline. /load-module.js is a
+// public/ asset served at the site root, so it has no module graph for Rollup to
+// resolve at build time; a literal specifier makes the build fail outright
+// ("Rollup failed to resolve import /load-module.js"), and @vite-ignore does not
+// help because it only silences the warning for a specifier Rollup cannot
+// analyse, and a string literal is one it can. Indirection is what actually
+// defers the resolution to the browser, where the path is correct.
+const LOAD_MODULE_URL = '/load-module.js';
async function loadCdnModule(url) {
- const { loadModule } = await import('/load-module.js');
+ const { loadModule } = await import(/* @vite-ignore */ LOAD_MODULE_URL);
return loadModule(url);
}