or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

build-optimization.mdcli.mdcomponents.mdcontext.mdevent-handling.mdindex.mdjsx-elements.mdloader.mdqrl-system.mdserver-rendering.mdstate-management.mdstyling.mdtasks-resources.mdtesting.md
tile.json

loader.mddocs/

Loader & Preloading

Bundle preloading functionality for optimizing Qwik application loading performance. The loader manages resource preloading and bundle graphs to minimize network requests.

Capabilities

Bundle Preloading

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" }
]);