From cf11ef8e9da133e4f95365f9255374a5485c8eb6 Mon Sep 17 00:00:00 2001 From: chenxing Date: Sat, 3 Oct 2026 13:55:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(theme):=20=E6=8E=A5=E5=85=A5=20YschTheme?= =?UTF-8?q?=20=E4=B8=AD=E5=A4=AE=E9=9D=99=E6=80=81=E9=80=9A=E9=81=93?= =?UTF-8?q?=EF=BC=88T5=EF=BC=8CA=20=E7=B1=BB=E5=85=8D=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=EF=BC=89=E2=80=94=E2=80=94index.html=20env-config=20=E5=BC=95?= =?UTF-8?q?=E5=AF=BC=E5=90=8E=E6=8F=92=E5=85=A5=E4=B8=BB=E9=A2=98=E9=80=9A?= =?UTF-8?q?=E9=81=93=20loader=EF=BC=88=E4=BC=98=E5=85=88=E7=BA=A7=20static?= =?UTF-8?q?Host=20>=20baseHost=20>=20%VITE=5FTHEME=5FHOST%=20=E4=BB=85=20d?= =?UTF-8?q?ev=20>=20=E5=90=8C=E6=BA=90=20/static=EF=BC=8Cdocument.write=20?= =?UTF-8?q?parser-blocking=EF=BC=8C=E4=BA=A7=E7=89=A9=E5=8D=A0=E4=BD=8D?= =?UTF-8?q?=E7=AC=A6=E5=8E=9F=E6=A0=B7=E9=9B=B6=E7=83=A7=E5=85=A5=EF=BC=89?= =?UTF-8?q?=EF=BC=9Bvite.config=20=E5=8A=A0=20/static=20dev=20=E4=BB=A3?= =?UTF-8?q?=E7=90=86=EF=BC=88YH=5FTHEME=5FPROXY=5FTARGET=20=E5=8F=AF?= =?UTF-8?q?=E8=A6=86=E7=9B=96=EF=BC=8C=E9=BB=98=E8=AE=A4=E7=BA=BF=E4=B8=8A?= =?UTF-8?q?=E9=80=9A=E9=81=93=EF=BC=89=EF=BC=9B.env.dev=20=E8=A1=A5?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E9=80=9A=E9=81=93=E8=BF=9E=E6=B3=95=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E3=80=82=E7=BA=AF=E5=8F=A0=E5=8A=A0=E9=9B=B6=E5=88=A0?= =?UTF-8?q?=E6=94=B9=EF=BC=8C=E6=9C=AC=E6=B3=A2=E4=B8=8D=E5=9B=9E=E6=94=B6?= =?UTF-8?q?=20layout.css/icons.css?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 4 ++++ index.html | 12 ++++++++++++ vite.config.ts | 6 ++++++ 3 files changed, 22 insertions(+) diff --git a/.env.dev b/.env.dev index 90fd7f8..d8b5312 100644 --- a/.env.dev +++ b/.env.dev @@ -9,3 +9,7 @@ VITE_SERVICE_HOST= VITE_ZIYUANKU_HOST=https://base.bestsch.com/BschZyk VITE_ZHUANXIANG_HOST=https://base.bestsch.com/BschZncpd VITE_IS_MOCK=false + +# YschTheme 主题通道(T5 A 类接入):dev 下 loader 走 vite /static 代理,默认指线上通道; +# 想连本地通道时用环境变量覆盖(不烧入任何已发布值): +# YschTheme 仓 npm run serve:static(9527)后,以 YH_THEME_PROXY_TARGET=http://localhost:9527 启动 dev diff --git a/index.html b/index.html index 5d7555f..3a356c8 100644 --- a/index.html +++ b/index.html @@ -29,6 +29,18 @@ } })(); + + <%- title %> diff --git a/vite.config.ts b/vite.config.ts index e470fb9..f5e9d1c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -106,6 +106,12 @@ export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => { target: "http://localhost:8086", changeOrigin: true, }, + // YschTheme 主题通道 dev 代理(T5 A 类接入配套):dev 无 __APP_CONFIG__,loader 落到 + // 同源相对 /static → 由此代理兜到通道;默认线上通道,可指本地 serve:static + "/static": { + target: process.env.YH_THEME_PROXY_TARGET || "http://base.yunhaixingtong.com", + changeOrigin: true, + }, }, }, // css预处理器