import type { Plugin } from "vite"; /** * Builds the module id used to import a subset of a route file's exports. * * The `pick` list has to live in the query so that the same file can be * instantiated once per export subset (the client picks `default`/`$css`, * the server picks its HTTP handlers). That query would otherwise leave the * id ending in `?pick=GET`, which silently excludes route files from any * plugin whose filter is anchored on the file extension -- a very common * default, e.g. unplugin-macros' `/\.[cm]?[jt]sx?$/`. * * The trailing `lang.` marker is the same convention Vue SFCs use * (`?vue&type=script&lang.ts`) and puts a real extension back at the end of * the id, so those filters match again. * * @see https://github.com/solidjs/solid-start/issues/1918 */ export declare function toPickId(src: string, pick: string[]): string; /** * Rollup's default chunk name sanitizer, plus a pass that drops the * `?pick=...&lang` tail so route chunks keep the short, stable filenames they * had before the `lang` marker was introduced (`index-.js`, not * `index.tsx_pick_default_pick__css_lang-.js`). Client chunk filenames * are public URLs, so this is not purely cosmetic. * * @see https://github.com/rollup/rollup/blob/master/src/utils/sanitizeFileName.ts */ export declare function sanitizeChunkFileName(name: string): string; export declare function treeShake(): Plugin;