vite-plugin-shopify-theme-islands
Version:
Vite plugin for island architecture in Shopify themes
28 lines (27 loc) • 1.19 kB
TypeScript
/**
* Virtual revive module source generator.
* Single place for "what the client receives" when loading the revive virtual module.
*/
import type { ReviveOptions } from "./contract.js";
export interface BuildReviveModuleSourceParams {
/** Resolved path to the runtime module (revive export). */
runtimePath: string;
/** import.meta.glob expressions for configured island directories. */
directoryGlobs: string[];
/** Additional discovered island paths outside the configured directories. */
islandPaths?: string[] | null;
/** Explicit file-path-to-tag overrides emitted by the plugin. */
resolvedTags?: Record<string, string | false>;
/** Resolved custom directive modules keyed by attribute name. */
customDirectives?: Array<{
name: string;
entrypoint: string;
}>;
/** Options object passed to revive (JSON-serialized in output). */
reviveOptions: ReviveOptions;
}
/**
* Builds the source code for the virtual revive module.
* Used by the plugin's load() so the emitted shape is defined and testable in one place.
*/
export declare function buildReviveModuleSource(params: BuildReviveModuleSourceParams): string;