feat: split and hash static css
This commit is contained in:
@@ -21,6 +21,13 @@ export type BuildTimeTrieData = QuartzPluginData & {
|
||||
filePath: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Mapping from logical asset names (e.g. "index.css") to their content-hashed
|
||||
* filenames (e.g. "index-a3f2c1b.css"). Populated by the ComponentResources
|
||||
* emitter before pages are rendered.
|
||||
*/
|
||||
export type HashedResourceNames = Record<string, string>
|
||||
|
||||
export interface BuildCtx {
|
||||
buildId: string
|
||||
argv: Argv
|
||||
@@ -31,6 +38,10 @@ export interface BuildCtx {
|
||||
incremental: boolean
|
||||
/** Virtual pages generated by page type plugins (e.g. tag pages, folder pages, bases pages) */
|
||||
virtualPages: ProcessedContent[]
|
||||
/** Content-hashed asset filenames, populated by ComponentResources emitter */
|
||||
hashedResourceNames?: HashedResourceNames
|
||||
/** Maps CSS content strings to their emitted hashed filenames. Populated by ComponentResources. */
|
||||
componentCssMap?: Map<string, string>
|
||||
}
|
||||
|
||||
export function trieFromAllFiles(allFiles: QuartzPluginData[]): FileTrieNode<BuildTimeTrieData> {
|
||||
|
||||
Reference in New Issue
Block a user