vite-plugin-react-server
Version:
Vite plugin for React Server Components (RSC)
26 lines • 1.05 kB
TypeScript
import type { ResolvedUserOptions, CssContent } from "../types.js";
/**
* Creates a CssContent object for a given path and css options
*
* Requirements:
* - path is a string
* - css is an object with the following properties:
* - inlineCss: boolean
* - purgeCss: boolean
* - inlineThreshold: number
* - inlinePatterns: RegExp[]
* - linkPatterns: RegExp[]
* based on the bundle, we retrieve the css content and check if it should be inlined or linked
* inlined tags get the as:style and the children are the css content
* linked tags get the as:link and the href is the path
*
* @param path - The path to the css file
* @param css - The css options
* @returns A CssContent object
*/
export declare const createCssProps: ({ id, code, userOptions, }: {
id: string;
code: string;
userOptions: Pick<ResolvedUserOptions, "css" | "moduleBaseURL" | "moduleBasePath" | "moduleRootPath" | "projectRoot" | "normalizer" | "moduleID" | "publicOrigin">;
}) => CssContent<boolean>;
//# sourceMappingURL=createCssProps.d.ts.map