ldc-cocotte/resources/ts/modules/vite-asset.ts
2026-10-27 09:58:12 +01:00

11 lines
233 B
TypeScript

function viteAsset(path: string) {
const assetPath = globalThis.__SYSTEM._asset[path];
if (assetPath !== "string") {
throw new TypeError(`Missing asset path '${path}'`);
}
return assetPath;
}
export default viteAsset;