mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-24 04:47:03 +00:00
Rename the `server/` directory to `hub/` and update all references across CLI, docs, web, and workspace configuration.
16 lines
517 B
TypeScript
16 lines
517 B
TypeScript
import type { EmbeddedWebAsset } from './embeddedAssets.generated';
|
|
|
|
let embeddedAssetMap: Map<string, EmbeddedWebAsset> | null = null;
|
|
|
|
export type { EmbeddedWebAsset };
|
|
|
|
export async function loadEmbeddedAssetMap(): Promise<Map<string, EmbeddedWebAsset>> {
|
|
if (embeddedAssetMap) {
|
|
return embeddedAssetMap;
|
|
}
|
|
|
|
const { embeddedAssets } = await import('./embeddedAssets.generated');
|
|
embeddedAssetMap = new Map(embeddedAssets.map((asset) => [asset.path, asset]));
|
|
return embeddedAssetMap;
|
|
}
|