Bundle preloading functionality for optimizing Qwik application loading performance. The loader manages resource preloading and bundle graphs to minimize network requests.
Functions for preloading Qwik bundles and managing bundle graphs.
/**
* Load and parse bundle graph for preloading
* @param bundleGraph - Bundle graph data
*/
function loadBundleGraph(bundleGraph: any): void;
/**
* Parse bundle graph data structure
* @param data - Raw bundle graph data
*/
function parseBundleGraph(data: any): any;
/**
* Preload resources based on bundle graph
* @param resources - Resources to preload
*/
function preload(resources: any[]): void;
/**
* Handle bundle loading
* @param bundle - Bundle to handle
*/
function handleBundle(bundle: any): void;Usage Examples:
import { loadBundleGraph, preload } from "@builder.io/qwik/loader";
// Load bundle graph for preloading
loadBundleGraph(bundleGraphData);
// Preload specific resources
preload([
{ url: "/build/chunk-1.js", type: "script" },
{ url: "/build/chunk-2.js", type: "script" }
]);