Commit 81cda5dd authored by 胡's avatar

feat: 配置打包命令

parent 8acfcc57
...@@ -5,17 +5,17 @@ ...@@ -5,17 +5,17 @@
"dev": "vite ", "dev": "vite ",
"build": "vite build", "build": "vite build",
"preview": "vite preview", "preview": "vite preview",
"build:selfService": "VITE_TARGET=selfService vite build --mode test", "build:selfService": "set VITE_TARGET=selfService&& vite build --mode test",
"build:intention": "VITE_TARGET=intention vite build --mode test", "build:intention": "set VITE_TARGET=intention&& vite build --mode test",
"build:calculator": "VITE_TARGET=calculator vite build --mode test", "build:calculator": "setVITE_TARGET=calculator&& vite build --mode test",
"build:about": "VITE_TARGET=about vite build --mode test", "build:about": "setVITE_TARGET=about&& vite build --mode test",
"build:complaint": "VITE_TARGET=complaint vite build --mode test", "build:complaint": "setVITE_TARGET=complaint&& vite build --mode test",
"build:infoChange": "VITE_TARGET=infoChange vite build --mode test", "build:infoChange": "setVITE_TARGET=infoChange&& vite build --mode test",
"build:relatedProject": "VITE_TARGET=relatedProject vite build --mode test", "build:relatedProject": "setVITE_TARGET=relatedProject&& vite build --mode test",
"build:repayPlan": "VITE_TARGET=repayPlan vite build --mode test", "build:repayPlan": "setVITE_TARGET=repayPlan&& vite build --mode test",
"build:contractSign": "VITE_TARGET=contractSign vite build --mode test", "build:contractSign": "setVITE_TARGET=contractSign&& vite build --mode test",
"build:projectList": "VITE_TARGET=projectList vite build --mode test", "build:projectList": "setVITE_TARGET=projectList&& vite build --mode test",
"build:makeRepayment": "VITE_TARGET=makeRepayment vite build --mode test" "build:makeRepayment": "setVITE_TARGET=makeRepayment&& vite build --mode test"
}, },
"dependencies": { "dependencies": {
"@hips/plugin-vue-jssdk": "^1.1.2", "@hips/plugin-vue-jssdk": "^1.1.2",
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
"@vitejs/plugin-vue": "^3.2.0", "@vitejs/plugin-vue": "^3.2.0",
"less": "^4.1.3", "less": "^4.1.3",
"terser": "^5.16.0", "terser": "^5.16.0",
"vite": "^3.1.8", "vite": "3.1.8",
"vite-plugin-pages": "^0.27.1", "vite-plugin-pages": "^0.27.1",
"vite-plugin-style-import": "1.4.1" "vite-plugin-style-import": "1.4.1"
} }
......
...@@ -43,6 +43,7 @@ const setRouteConfig = (VITE_TARGET) => { ...@@ -43,6 +43,7 @@ const setRouteConfig = (VITE_TARGET) => {
export default ({ mode }) => { export default ({ mode }) => {
let VITE_TARGET = loadEnv(mode, process.cwd()).VITE_TARGET; let VITE_TARGET = loadEnv(mode, process.cwd()).VITE_TARGET;
let VITE_HTTP_BASE_URL = loadEnv(mode, process.cwd()).VITE_HTTP_BASE_URL; let VITE_HTTP_BASE_URL = loadEnv(mode, process.cwd()).VITE_HTTP_BASE_URL;
console.log(`当前配置: 环境:${mode}, 目标目录:${VITE_TARGET}, 后台基系统:${VITE_HTTP_BASE_URL}`);
return { return {
base: './', base: './',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment