mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-24 23:17:23 +00:00
fix(gui): load the puter.js bundle the server configured
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user