Skip to content

Commit 5d89fdb

Browse files
committed
fix(docs): 修复生产环境下的base路径配置
将base路径配置为根据环境变量动态设置,确保生产环境下使用正确的路径前缀。同时修正chunkSizeWarningLimit的注释说明。
1 parent 7620af3 commit 5d89fdb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎docs/.vitepress/config.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { defineConfig } from 'vitepress'
33
export default defineConfig({
44
title: 'Python基础编程学习',
55
description: 'Python基础编程完整学习教程',
6-
base: '/',
6+
base: process.env.NODE_ENV === 'production' ? '/python-awesome-basic-coding/' : '/',
77
ignoreDeadLinks: true,
88
cleanUrls: true,
99
build: {
10-
chunkSizeWarningLimit: 2000 // 提高到2MB
10+
chunkSizeWarningLimit: 2000 // 提高到1MB
1111
},
1212

1313
themeConfig: {
@@ -948,4 +948,4 @@ export default defineConfig({
948948
// 可以在这里添加markdown插件
949949
}
950950
}
951-
})
951+
})

0 commit comments

Comments
 (0)