兼容性修复
This commit is contained in:
+3
-3
@@ -32,13 +32,13 @@ show_help() {
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# 自动识别项目名称 (x8 / x9),依据脚本所在的项目根目录名
|
# 自动识别项目名称 (x8 / x9 / b9 / bd9 / bh9),依据脚本所在的项目根目录名
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
PROJECT_ROOT="$(basename "$(dirname "$SCRIPT_DIR")")"
|
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
|
if [ -z "$PROJECT_NAME" ]; then
|
||||||
echo "错误: 无法从路径 '$PROJECT_ROOT' 识别项目名称 (x8/x9/b9)"
|
echo "错误: 无法从路径 '$PROJECT_ROOT' 识别项目名称 (x8/x9/b9/bd9/bh9)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ const plugins = [
|
|||||||
const DEPLOY_ENV = process.env.DEPLOY_ENV || "production";
|
const DEPLOY_ENV = process.env.DEPLOY_ENV || "production";
|
||||||
const isProd = process.env.NODE_ENV === "production";
|
const isProd = process.env.NODE_ENV === "production";
|
||||||
const deployBase = isProd
|
const deployBase = isProd
|
||||||
? (DEPLOY_ENV === "test" ? "/b9/test/modern/" : "/b9/v2/modern/")
|
? (DEPLOY_ENV === "test" ? "/bd9/test/modern/" : "/bd9/v2/modern/")
|
||||||
: "/";
|
: "/";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ function legacySkipModernCssPlugin(): Plugin {
|
|||||||
const DEPLOY_ENV = process.env.DEPLOY_ENV || "production";
|
const DEPLOY_ENV = process.env.DEPLOY_ENV || "production";
|
||||||
const isProd = process.env.NODE_ENV === "production";
|
const isProd = process.env.NODE_ENV === "production";
|
||||||
const deployBase = isProd
|
const deployBase = isProd
|
||||||
? (DEPLOY_ENV === "test" ? "/b9/test/legacy/" : "/b9/v2/legacy/")
|
? (DEPLOY_ENV === "test" ? "/bd9/test/legacy/" : "/bd9/v2/legacy/")
|
||||||
: "/";
|
: "/";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|||||||
Reference in New Issue
Block a user