兼容性修复

This commit is contained in:
eafonyang
2026-09-29 16:03:11 +08:00
parent e5fae70adc
commit 65f9be4f64
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -32,13 +32,13 @@ show_help() {
EOF
}
# 自动识别项目名称 (x8 / x9),依据脚本所在的项目根目录名
# 自动识别项目名称 (x8 / x9 / b9 / bd9 / bh9),依据脚本所在的项目根目录名
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(basename "$(dirname "$SCRIPT_DIR")")"
PROJECT_NAME="$(echo "$PROJECT_ROOT" | grep -oE '^(x8|x9|b9)')"
PROJECT_NAME="$(echo "$PROJECT_ROOT" | grep -oE '^(bd9|bh9|x8|x9|b9)')"
if [ -z "$PROJECT_NAME" ]; then
echo "错误: 无法从路径 '$PROJECT_ROOT' 识别项目名称 (x8/x9/b9)"
echo "错误: 无法从路径 '$PROJECT_ROOT' 识别项目名称 (x8/x9/b9/bd9/bh9)"
exit 1
fi
+1 -1
View File
@@ -53,7 +53,7 @@ const plugins = [
const DEPLOY_ENV = process.env.DEPLOY_ENV || "production";
const isProd = process.env.NODE_ENV === "production";
const deployBase = isProd
? (DEPLOY_ENV === "test" ? "/b9/test/modern/" : "/b9/v2/modern/")
? (DEPLOY_ENV === "test" ? "/bd9/test/modern/" : "/bd9/v2/modern/")
: "/";
export default defineConfig({
+1 -1
View File
@@ -47,7 +47,7 @@ function legacySkipModernCssPlugin(): Plugin {
const DEPLOY_ENV = process.env.DEPLOY_ENV || "production";
const isProd = process.env.NODE_ENV === "production";
const deployBase = isProd
? (DEPLOY_ENV === "test" ? "/b9/test/legacy/" : "/b9/v2/legacy/")
? (DEPLOY_ENV === "test" ? "/bd9/test/legacy/" : "/bd9/v2/legacy/")
: "/";
export default defineConfig({