feat: split and hash static css

This commit is contained in:
saberzero1
2026-05-22 22:42:06 +02:00
parent 2e34c64c63
commit cfba672f51
6 changed files with 137 additions and 38 deletions
+7
View File
@@ -68,6 +68,13 @@ export interface StaticResources {
}
export type StringResource = string | string[] | undefined
export function normalizeResource(resource: StringResource): string[] {
if (!resource) return []
if (Array.isArray(resource)) return resource
return [resource]
}
export function concatenateResources(...resources: StringResource[]): StringResource {
return resources
.filter((resource): resource is string | string[] => resource !== undefined)