新增 build:test 方便构建线上的测试环境,优化分享码功能的交互
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user