From b91d7405fcff6d58a95695f61fcd2ebce50a794a Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Fri, 9 May 2025 10:47:29 +0800 Subject: [PATCH] update --- .env.staging | 2 +- src/main.ts | 4 ++-- src/rsbuild-env.d.ts | 11 +++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 src/rsbuild-env.d.ts diff --git a/.env.staging b/.env.staging index 80a4f74..9532893 100644 --- a/.env.staging +++ b/.env.staging @@ -2,4 +2,4 @@ PUBLIC_JUDGE0API_URL=http://10.13.114.214:8082 PUBLIC_MAXKB_URL= PUBLIC_CODEAPI_URL=http://10.13.114.214:8092 PUBLIC_PYVIZ_URL=http://10.13.114.214:9000 -PUBLIC_ICONIFY=http://10.13.114.214:8098 \ No newline at end of file +PUBLIC_ICONIFY_URL=http://10.13.114.214:8098 \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 02f28bb..e059752 100644 --- a/src/main.ts +++ b/src/main.ts @@ -52,8 +52,8 @@ const app = createApp(App) app.use(naive) app.mount("#app") -if (!!import.meta.env.PUBLIC_ICONIFY) { +if (!!import.meta.env.PUBLIC_ICONIFY_URL) { addAPIProvider("", { - resources: [import.meta.env.PUBLIC_ICONIFY], + resources: [import.meta.env.PUBLIC_ICONIFY_URL], }) } diff --git a/src/rsbuild-env.d.ts b/src/rsbuild-env.d.ts new file mode 100644 index 0000000..0e81124 --- /dev/null +++ b/src/rsbuild-env.d.ts @@ -0,0 +1,11 @@ +interface ImportMetaEnv { + readonly PUBLIC_JUDGE0API_URL: string + readonly PUBLIC_MAXKB_URL: string + readonly PUBLIC_CODEAPI_URL: string + readonly PUBLIC_PYVIZ_URL: string + readonly PUBLIC_ICONIFY_URL: string +} + +interface ImportMeta { + readonly env: ImportMetaEnv +}