fix: bundle assets into executable

This commit is contained in:
2026-03-13 09:19:54 +07:00 Unverified
parent 649466a4de
commit b26fdbb9da
3 changed files with 16 additions and 6 deletions
+6 -5
View File
@@ -11,10 +11,11 @@ import {
import { twj } from "tw-to-css";
import type { App } from "@";
import { ConstsSvg } from "@/assets/consts";
import { mockData } from "@/lib/mock";
import shadeSvg from "@/assets/shade.svg" with { type: "file" };
import fontFile from "@/assets/shinshin.woff2" with { type: "file" };
const font = file("src/assets/shinshin.woff2");
const shade = file("src/assets/shade.svg");
const font = file(fontFile);
const shade = file(shadeSvg);
export function card(app: App) {
return app
@@ -28,8 +29,8 @@ export function card(app: App) {
"/genshin/:uid/:char",
async ({ params: { uid, char: charId } }) => {
try {
// const data = await fetchEnka(uid, false);
const data = mockData;
// const data = mockData;
const data = await fetchEnka(uid, false);
if (typeof data.avatarInfoList === "undefined")
return status(400, "The showcase for this UID is private");
const char = data.avatarInfoList.find(