From 6fcbf918f15996756a987ba4d77982d2fd1e196b Mon Sep 17 00:00:00 2001 From: ray_wuhao <443547225@qq.com> Date: Thu, 6 Apr 2023 15:20:22 +0800 Subject: [PATCH] =?UTF-8?q?base=20url=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cfg.ts | 1 + vite.config.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cfg.ts b/cfg.ts index ca29a80b..2e38e669 100644 --- a/cfg.ts +++ b/cfg.ts @@ -47,6 +47,7 @@ import { import type { AppConfigExport } from './src/types/cfg' const config: AppConfigExport = { + /** 公共基础路径配置, 如果为空则会默认以 '/' 填充 */ base: '/ray-template/', /** 配置首屏加载信息 */ preloadingConfig: { diff --git a/vite.config.ts b/vite.config.ts index 4fd14904..9b7217b9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -61,7 +61,7 @@ const __APP_CFG__ = { // https://vitejs.dev/config/ export default defineConfig(async ({ mode }) => { return { - base, + base: base || '/', define: { __APP_CFG__: JSON.stringify(__APP_CFG__), },