UNPKG

@jakobcooldown/react-csr-sdk

Version:

Mockery SDK for dynamic bundle loading in web applications

25 lines (24 loc) 861 B
/** * Set a custom bundle URL to be loaded instead of the default bundle. * Call this when a user logs in or switches tenants. * * @param bundleUrl - The URL of the custom bundle, or undefined to clear * @param reload - Whether to reload the page immediately (default: true) */ export declare function setCustomBundle(bundleUrl: string | undefined, reload?: boolean): void; /** * Get the currently set custom bundle URL */ export declare function getCustomBundle(): string | undefined; /** * Clear the custom bundle URL and optionally reload */ export declare function clearCustomBundle(reload?: boolean): void; /** * Set a custom bundle URL and reload the page */ export declare function reloadWithBundle(bundleUrl: string | undefined): void; /** * Enable or disable debug logging */ export declare function setDebugMode(enabled: boolean): void;