From e05cd0c05b5b2dd779720a87cf41d9897d1033db Mon Sep 17 00:00:00 2001 From: bLue Date: Fri, 17 Nov 2023 15:49:02 +0800 Subject: [PATCH] feat: update build config --- .umirc.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.umirc.ts b/.umirc.ts index d215597..f008fd4 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -6,7 +6,7 @@ const isProd = process.env.NODE_ENV === 'production'; const siteAlias = process.env.SITE_ALIAS; const outputPath = isProd && siteAlias === 'cn' ? '分发' : 'dist'; -const publicProdPrefix = siteAlias === 'cn' ? 'https://内容分发网络.算法与用户体验.中国/榜单大陆/' : siteAlias === 'cnn' ? 'https://内容分发网络.算法与用户体验.中国/rl/' : '/'; +const publicProdPrefix = siteAlias === 'cn' ? 'https://内容分发网络.算法与用户体验.中国/榜单大陆/' : siteAlias === 'cnn' ? 'https://cdn.algoux.cn/rl/' : '/'; const publicPath = isProd ? `${publicProdPrefix}${outputPath}/` : `http://127.0.0.1:8000/${outputPath}/`; console.log( 'Build options:', @@ -35,11 +35,11 @@ export default defineConfig({ title: false, antd: {}, define: { - 'process.env.API_BASE_CLIENT': isProd ? 'https://rl.mushan.top' : 'http://rl_dev.mushan.top', - 'process.env.API_BASE_SERVER': isProd ? 'https://rl.mushan.top' : 'http://rl_dev.mushan.top', - 'process.env.CDN_API_BASE_CLIENT': isProd ? 'https://algoux-rl.cdn.blueverse.cc' : 'http://rl_dev.mushan.top', - 'process.env.CDN_API_BASE_SERVER': isProd ? 'https://algoux-rl.cdn.blueverse.cc' : 'http://rl_dev.mushan.top', - 'process.env.WS_BASE': isProd ? 'wss://rl.mushan.top' : 'ws://rl_dev.mushan.top', + 'process.env.API_BASE_CLIENT': isProd ? 'https://rl.mushan.top' : 'https://rl.mushan.top', + 'process.env.API_BASE_SERVER': isProd ? 'https://rl.mushan.top' : 'https://rl.mushan.top', + 'process.env.CDN_API_BASE_CLIENT': isProd ? 'https://algoux-rl.cdn.blueverse.cc' : 'https://rl.mushan.top', + 'process.env.CDN_API_BASE_SERVER': isProd ? 'https://algoux-rl.cdn.blueverse.cc' : 'https://rl.mushan.top', + 'process.env.WS_BASE': isProd ? 'wss://rl.mushan.top' : 'wss://rl.mushan.top', 'process.env.SITE_ALIAS': process.env.SITE_ALIAS, 'process.env.HOST_GLOBAL': 'rl.algoux.org', 'process.env.HOST_CN': 'rl.algoux.cn',