Skip to content

Commit

Permalink
feat: update build config
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerblue committed Nov 17, 2023
1 parent f16b4d2 commit e05cd0c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .umirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:',
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit e05cd0c

Please sign in to comment.