UNPKG

@marko/vite

Version:
29 lines (28 loc) 1.39 kB
export declare const linkAssetsRuntimeId = "\0marko-link-assets.mjs"; export declare function supportsLinkAssets(translator?: string): boolean; /** * Builds the code injected into a compiled module to register the dev asset * manifest entry for an asset id with the runtime module below (page entries * register their document manifest, lazily loaded templates register their * dev load entry script tag). Since the registration runs at module scope in * the SSR environment itself, it works regardless of where that environment * runs and always executes before a render can flush assets. `entry` is a * code expression. */ export declare function getRegisterAssetsCode(assetId: string, entry: string): string; /** * Builds the manifest entry for a lazily loaded (`import ... with { load }`) * asset in dev. In dev css is loaded through the entry's js module, so the * assets are all render blocking: the page is hidden until the dev server * module for the load entry has been imported (which applies its css and * signals hydration readiness). `url` must be relative to the base path (no * leading slash). */ export declare function getDevLoadAssetsManifest(url: string): { block: (string | import("./serializer").InjectType)[]; }; export declare function getLinkAssetsRuntime(opts: { isBuild: boolean; runtimeId?: string; basePathVar?: string; }): string;