新增 build:test 方便构建线上的测试环境,优化分享码功能的交互

This commit is contained in:
eafonyang
2026-06-17 16:51:36 +08:00
parent 7eb7647484
commit 8d369412fd
12 changed files with 213 additions and 18 deletions
+8 -1
View File
@@ -43,12 +43,19 @@ function legacySkipModernCssPlugin(): Plugin {
};
}
/* ── Deploy base path ── */
const DEPLOY_ENV = process.env.DEPLOY_ENV || "production";
const isProd = process.env.NODE_ENV === "production";
const deployBase = isProd
? (DEPLOY_ENV === "test" ? "/x9/test/legacy/" : "/x9/v2/legacy/")
: "/";
export default defineConfig({
plugins: [legacySkipModernCssPlugin(), legacyIndexRewritePlugin(), react(), jsxLocPlugin()],
define: {
"import.meta.env.VITE_X9_LEGACY": JSON.stringify("1"),
},
base: process.env.NODE_ENV === "production" ? "/x9/v2/legacy/" : "/",
base: deployBase,
resolve: {
alias: {
"@": path.resolve(PROJECT_ROOT, "client", "src"),