Documentation navigation

App

Vite and chunking

Configure app Vite integration and understand lazy/shared chunk output.

Configure the app Vite integration with wseffect({ primaryPages, pwa }). primaryPages names pages that must be precached for offline use. App-source modules shared between the entry and lazy pages are isolated into app-shared-* assets; generated shared assets are precached with the entry.

Build identity is required: the plugin uses the Git commit when available, or accepts WSEFFECT_BUILD_ID as a stable 7–64 lowercase hexadecimal source identifier. It fails when it cannot derive or receive an ID; do not invent a random fallback. See the full starter Vite config for an executable project path.

./vite

@wsagency/wseffect-app · MIT · source · MIT license · WS-AGENCY-NOTICE

This entry point is published in @wsagency/wseffect-app@0.1.0-rc.1. Import it from the package subpath shown below; the signatures and documentation are read from the installed package declarations.

import * as Wseffect from '@wsagency/wseffect-app/vite'

Exported declarations

computeBuildId

export declare function computeBuildId({ appRoot, workspaceRoot, env }: ComputeBuildIdInput): string;

validateManifest

export declare function validateManifest(manifest: Partial<ManifestOptions>): string[];

wseffect

export declare function wseffect(options: WseffectOptions): Array<Plugin>;

WseffectOptions

export interface WseffectOptions {
    readonly pagesDir?: string;
    readonly primaryPages: ReadonlyArray<string>;
    readonly pwa: false | {
        readonly manifest: Partial<ManifestOptions>;
    };
}