11 lines
233 B
TypeScript
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;
|