fix(gui): load the puter.js bundle the server configured

This commit is contained in:
Juan Castro
2026-08-13 13:33:43 -04:00
parent d66c30b1b1
commit 6b5be7b42e
2 changed files with 5 additions and 1 deletions
@@ -185,6 +185,10 @@ export class PuterHomepageService extends PuterService {
app_origin: this.#originFromRequest(req),
gui_origin: this.#originFromRequest(req),
hosting_domain: this.config.static_hosting_domain,
// The GUI loads the SDK itself in bundled mode, so it needs this
// to serve its own build rather than the public CDN.
puterjs_bundle:
this.config.gui_puterjs_bundle ?? 'https://js.puter.com/v2/',
asset_dir: assetDir,
captchaRequired,
...meta,
+1 -1
View File
@@ -75,7 +75,7 @@ window.gui = async (options) => {
else if ( window.gui_env === 'prod' ) {
// This stuff is now handled in the backend in PuterHomepageService
await window.loadScript('https://js.puter.com/v2/');
await window.loadScript(options.puterjs_bundle ?? 'https://js.puter.com/v2/');
// Load the minified bundles
// await window.loadCSS('/dist/bundle.min.css');
}