vite-plugin-shopify-theme-islands
Version:
Vite plugin for island architecture in Shopify themes
32 lines (31 loc) • 1.07 kB
TypeScript
import type { ReviveOptions } from "./contract.js";
export interface ResolvedCustomDirective {
name: string;
entrypoint: string;
}
export interface ReviveBootstrapInputs {
root: string;
directories: string[];
islandFiles: Set<string>;
customDirectives?: Array<{
name: string;
entrypoint: string;
}>;
reviveOptions: ReviveOptions;
}
export interface ReviveBootstrapPlan {
runtimePath: string;
directoryGlobs: string[];
islandPaths: string[] | null;
customDirectives: ResolvedCustomDirective[] | null;
reviveOptions: ReviveOptions;
}
export interface ReviveBootstrapCompilerPorts {
resolveEntrypoint(entrypoint: string): Promise<string>;
toLoadPaths(islandFiles: Set<string>, root: string): string[];
}
export interface ReviveBootstrapCompiler {
plan(input: ReviveBootstrapInputs): Promise<ReviveBootstrapPlan>;
emit(plan: ReviveBootstrapPlan): string;
}
export declare function createReviveBootstrapCompiler(ports: ReviveBootstrapCompilerPorts, runtimePath: string): ReviveBootstrapCompiler;