build(custom): 环境变量调整

This commit is contained in:
2023-11-21 19:05:35 +08:00
parent efb6a5ec38
commit 8cc2f3a06d
5 changed files with 4529 additions and 1573 deletions

View File

@@ -14,6 +14,9 @@ VITE_WS1_URL='game.wanzhuanyongcheng.cn/dice/home'
VITE_WS_URL='test.wanzhuanyongcheng.cn/admin/data'
VITE_MER_LOGIN_URL='//localhost:3100/#/login'
VITE_MER_LOGIN_URL='//localhost:3100/login'
VITE_GAME_API='https://www.jdt168.com'
# 是否启用监控
VITE_SENTRY=false

View File

@@ -14,8 +14,7 @@ VITE_USE_COMPRESS=true
VITE_COMPRESS_TYPE=gzip
# base api
VITE_BASE_API='https://test.wanzhuanyongcheng.cn/admin'
VITE_BASE_API='//test.wanzhuanyongcheng.cn/admin'
VITE_WS1_URL='game.wanzhuanyongcheng.cn/dice/home'
@@ -23,7 +22,7 @@ VITE_WS_URL='test.wanzhuanyongcheng.cn/admin/data'
VITE_GAME_API='https://game.wanzhuanyongcheng.cn'
VITE_MER_LOGIN_URL='//test.wanzhuanyongcheng.cn/static/mer/#/login'
VITE_MER_LOGIN_URL='//jdt-test-mer.wanzhuanyongcheng.cn/login'
# 是否启用监控
VITE_SENTRY=false

6052
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,7 @@ export const router = createRouter({
export async function setupRouter(app) {
await addDynamicRoutes()
setupRouterGuard(router)
if (import.meta.env.VITE_SENTRY) {
if (import.meta.env.VITE_SENTRY === 'true') {
Sentry.init({
app,
dsn: 'https://1c158d5f832eef396e69447959d902d2@w.huakk.top/12',

View File

@@ -38,7 +38,7 @@ export default defineConfig(({ command, mode }) => {
outDir: OUTPUT_DIR || 'dist',
reportCompressedSize: false, // 启用/禁用 gzip 压缩大小报告
chunkSizeWarningLimit: 1024, // chunk 大小警告的限制单位kb
sourcemap: true,
sourcemap: VITE_SENTRY,
},
}
})