Commit 939cb9a7 authored by wcmoon's avatar wcmoon

fix: 配置打包

parent 65529b8a
NODE_ENV = 'production' NODE_ENV = 'production'
VUE_APP_CURRENTMODE = 'sy_test' VUE_APP_CURRENTMODE = 'sy_prod'
VUE_APP_VERSION = '0' VUE_APP_VERSION = '0'
\ No newline at end of file
NODE_ENV = 'production' NODE_ENV = 'production'
VUE_APP_CURRENTMODE = 'sy_prod' VUE_APP_CURRENTMODE = 'sy_test'
VUE_APP_VERSION = '0' VUE_APP_VERSION = '0'
\ No newline at end of file
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vue-cli-service serve --mode sy_test", "dev": "vue-cli-service serve --mode sy_test",
"build": "vue-cli-service build --mode sy_prod_build", "build": "vue-cli-service build --mode sy_build",
"deploy": "vue-cli-service build --mode sy_test_build && bash ./sy.sh" "deploy": "vue-cli-service build --mode sy_build && bash ./sy.sh"
}, },
"dependencies": { "dependencies": {
"@types/js-md5": "^0.4.2", "@types/js-md5": "^0.4.2",
......
const configModules = { const configModules = {
// 溯源>测试环境 // 溯源>测试环境
"sy_test": {
INERFACE_URL_PREFIX: '/api', INERFACE_URL_PREFIX: '/api',
/** /**
* 网站入口配置 * 网站入口配置
...@@ -13,15 +12,5 @@ const configModules = { ...@@ -13,15 +12,5 @@ const configModules = {
// 在 dist/index.html 的输出 // 在 dist/index.html 的输出
filename: 'index.html' filename: 'index.html'
} }
},
// 溯源>正式环境
"sy_prod": {
INERFACE_URL_PREFIX: '/api',
INDEX: {
entry: './src/entry/sy/main.ts',
template: './public/sy/index.html',
filename: 'index.html'
}
}
}; };
exports.model = configModules[process.env.VUE_APP_CURRENTMODE] exports.model = configModules
...@@ -10,7 +10,7 @@ module.exports = { ...@@ -10,7 +10,7 @@ module.exports = {
open: true, open: true,
proxy: { proxy: {
'^/api': { '^/api': {
target: 'http://172.16.101.87:46790/', target: 'http://172.16.101.87:46789/',
pathRewrite: { pathRewrite: {
'^/api': '', '^/api': '',
}, },
......
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