MCPcopy Create free account
hub / github.com/solidjs/solid-start / getAssets

Function getAssets

packages/start/src/shared/lazy.ts:9–17  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

7const assetsById: Record<string, Asset[]> = {};
8
9const getAssets = async (id: string) => {
10 if (assetsById[id]) return assetsById[id];
11
12 const manifest = getManifest(import.meta.env.SSR && import.meta.env.DEV ? "ssr" : "client");
13 const assets = await manifest.getAssets(id);
14 if (import.meta.env.PROD) assetsById[id] = assets;
15
16 return assets;
17};
18
19const withAssets = function <T extends () => Promise<{ default: Component<any> }>>(fn: T): T {
20 const wrapper = async () => {

Callers 1

wrapperFunction · 0.70

Calls 1

getAssetsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…