修正prd

This commit is contained in:
2025-12-02 14:43:35 +08:00
parent 73a349f98a
commit a853c16854
4 changed files with 59 additions and 39 deletions

View File

@@ -2,7 +2,7 @@
VITE_APP_TITLE=医院信息管理系统 VITE_APP_TITLE=医院信息管理系统
# 生产环境配置 # 生产环境配置
VITE_APP_ENV= 'production' VITE_APP_ENV= 'prd'
# OpenHIS管理系统/生产环境 # OpenHIS管理系统/生产环境
VITE_APP_BASE_API= '/prd-api' VITE_APP_BASE_API= '/prd-api'

View File

@@ -910,6 +910,7 @@
"version": "4.17.12", "version": "4.17.12",
"resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz", "resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==", "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
"peer": true,
"dependencies": { "dependencies": {
"@types/lodash": "*" "@types/lodash": "*"
} }
@@ -919,6 +920,7 @@
"resolved": "https://registry.npmmirror.com/@types/node/-/node-22.13.10.tgz", "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.13.10.tgz",
"integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==", "integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"undici-types": "~6.20.0" "undici-types": "~6.20.0"
} }
@@ -2324,6 +2326,7 @@
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz",
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
"peer": true,
"engines": { "engines": {
"node": ">=12" "node": ">=12"
} }
@@ -4215,7 +4218,8 @@
"node_modules/jquery": { "node_modules/jquery": {
"version": "3.7.1", "version": "3.7.1",
"resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz", "resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz",
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
"peer": true
}, },
"node_modules/js-base64": { "node_modules/js-base64": {
"version": "2.6.4", "version": "2.6.4",
@@ -4345,12 +4349,14 @@
"node_modules/lodash": { "node_modules/lodash": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"peer": true
}, },
"node_modules/lodash-es": { "node_modules/lodash-es": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz", "resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
"peer": true
}, },
"node_modules/lodash-unified": { "node_modules/lodash-unified": {
"version": "1.0.3", "version": "1.0.3",
@@ -5079,6 +5085,7 @@
"url": "https://github.com/sponsors/ai" "url": "https://github.com/sponsors/ai"
} }
], ],
"peer": true,
"dependencies": { "dependencies": {
"nanoid": "^3.3.8", "nanoid": "^3.3.8",
"picocolors": "^1.1.1", "picocolors": "^1.1.1",
@@ -5480,6 +5487,7 @@
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.35.0.tgz", "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.35.0.tgz",
"integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==", "integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"@types/estree": "1.0.6" "@types/estree": "1.0.6"
}, },
@@ -5644,6 +5652,7 @@
"resolved": "https://registry.npmmirror.com/sass/-/sass-1.69.5.tgz", "resolved": "https://registry.npmmirror.com/sass/-/sass-1.69.5.tgz",
"integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==", "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"chokidar": ">=3.0.0 <4.0.0", "chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0", "immutable": "^4.0.0",
@@ -5666,6 +5675,7 @@
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://registry.npmmirror.com/segmentit/-/segmentit-2.0.3.tgz", "resolved": "https://registry.npmmirror.com/segmentit/-/segmentit-2.0.3.tgz",
"integrity": "sha512-7mn2XL3OdTUQ+AhHz7SbgyxLTaQRzTWQNVwiK+UlTO8aePGbSwvKUzTwE4238+OUY9MoR6ksAg35zl8sfTunQQ==", "integrity": "sha512-7mn2XL3OdTUQ+AhHz7SbgyxLTaQRzTWQNVwiK+UlTO8aePGbSwvKUzTwE4238+OUY9MoR6ksAg35zl8sfTunQQ==",
"peer": true,
"dependencies": { "dependencies": {
"preval.macro": "^4.0.0" "preval.macro": "^4.0.0"
} }
@@ -7023,6 +7033,7 @@
"resolved": "https://registry.npmjs.org/vite/-/vite-5.0.4.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.4.tgz",
"integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==", "integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"esbuild": "^0.19.3", "esbuild": "^0.19.3",
"postcss": "^8.4.31", "postcss": "^8.4.31",
@@ -7116,6 +7127,7 @@
"version": "3.5.13", "version": "3.5.13",
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz", "resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz",
"integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==", "integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==",
"peer": true,
"dependencies": { "dependencies": {
"@vue/compiler-dom": "3.5.13", "@vue/compiler-dom": "3.5.13",
"@vue/compiler-sfc": "3.5.13", "@vue/compiler-sfc": "3.5.13",
@@ -7894,6 +7906,7 @@
"version": "4.17.12", "version": "4.17.12",
"resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz", "resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz",
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==", "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
"peer": true,
"requires": { "requires": {
"@types/lodash": "*" "@types/lodash": "*"
} }
@@ -7903,6 +7916,7 @@
"resolved": "https://registry.npmmirror.com/@types/node/-/node-22.13.10.tgz", "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.13.10.tgz",
"integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==", "integrity": "sha512-I6LPUvlRH+O6VRUqYOcMudhaIdUVWfsjnZavnsraHvpBwaEyMN29ry+0UVJhImYL16xsscu0aske3yA+uPOWfw==",
"dev": true, "dev": true,
"peer": true,
"requires": { "requires": {
"undici-types": "~6.20.0" "undici-types": "~6.20.0"
} }
@@ -8957,7 +8971,8 @@
"d3-selection": { "d3-selection": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/d3-selection/-/d3-selection-3.0.0.tgz",
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==" "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
"peer": true
}, },
"d3-shape": { "d3-shape": {
"version": "3.2.0", "version": "3.2.0",
@@ -10316,7 +10331,8 @@
"jquery": { "jquery": {
"version": "3.7.1", "version": "3.7.1",
"resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz", "resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz",
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==",
"peer": true
}, },
"js-base64": { "js-base64": {
"version": "2.6.4", "version": "2.6.4",
@@ -10424,12 +10440,14 @@
"lodash": { "lodash": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"peer": true
}, },
"lodash-es": { "lodash-es": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz", "resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==" "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
"peer": true
}, },
"lodash-unified": { "lodash-unified": {
"version": "1.0.3", "version": "1.0.3",
@@ -10934,6 +10952,7 @@
"version": "8.5.3", "version": "8.5.3",
"resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.3.tgz", "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.3.tgz",
"integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",
"peer": true,
"requires": { "requires": {
"nanoid": "^3.3.8", "nanoid": "^3.3.8",
"picocolors": "^1.1.1", "picocolors": "^1.1.1",
@@ -11238,6 +11257,7 @@
"resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.35.0.tgz", "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.35.0.tgz",
"integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==", "integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==",
"dev": true, "dev": true,
"peer": true,
"requires": { "requires": {
"@rollup/rollup-android-arm-eabi": "4.35.0", "@rollup/rollup-android-arm-eabi": "4.35.0",
"@rollup/rollup-android-arm64": "4.35.0", "@rollup/rollup-android-arm64": "4.35.0",
@@ -11351,6 +11371,7 @@
"resolved": "https://registry.npmmirror.com/sass/-/sass-1.69.5.tgz", "resolved": "https://registry.npmmirror.com/sass/-/sass-1.69.5.tgz",
"integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==", "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==",
"dev": true, "dev": true,
"peer": true,
"requires": { "requires": {
"chokidar": ">=3.0.0 <4.0.0", "chokidar": ">=3.0.0 <4.0.0",
"immutable": "^4.0.0", "immutable": "^4.0.0",
@@ -11367,6 +11388,7 @@
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://registry.npmmirror.com/segmentit/-/segmentit-2.0.3.tgz", "resolved": "https://registry.npmmirror.com/segmentit/-/segmentit-2.0.3.tgz",
"integrity": "sha512-7mn2XL3OdTUQ+AhHz7SbgyxLTaQRzTWQNVwiK+UlTO8aePGbSwvKUzTwE4238+OUY9MoR6ksAg35zl8sfTunQQ==", "integrity": "sha512-7mn2XL3OdTUQ+AhHz7SbgyxLTaQRzTWQNVwiK+UlTO8aePGbSwvKUzTwE4238+OUY9MoR6ksAg35zl8sfTunQQ==",
"peer": true,
"requires": { "requires": {
"preval.macro": "^4.0.0" "preval.macro": "^4.0.0"
} }
@@ -12422,6 +12444,7 @@
"resolved": "https://registry.npmjs.org/vite/-/vite-5.0.4.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.0.4.tgz",
"integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==", "integrity": "sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==",
"dev": true, "dev": true,
"peer": true,
"requires": { "requires": {
"esbuild": "^0.19.3", "esbuild": "^0.19.3",
"fsevents": "~2.3.3", "fsevents": "~2.3.3",
@@ -12468,6 +12491,7 @@
"version": "3.5.13", "version": "3.5.13",
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz", "resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.13.tgz",
"integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==", "integrity": "sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==",
"peer": true,
"requires": { "requires": {
"@vue/compiler-dom": "3.5.13", "@vue/compiler-dom": "3.5.13",
"@vue/compiler-sfc": "3.5.13", "@vue/compiler-sfc": "3.5.13",

View File

@@ -7,8 +7,8 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build:prd": "vite build --mode production", "build:prd": "vite build --mode prd",
"build:prod": "vite build --mode production", "build:prod": "vite build --mode prod",
"build:stage": "vite build --mode staging", "build:stage": "vite build --mode staging",
"build:test": "vite build --mode test", "build:test": "vite build --mode test",
"build:dev": "vite build --mode dev", "build:dev": "vite build --mode dev",

View File

@@ -3,14 +3,14 @@
* @Date: 2025-04-09 09:33:35 * @Date: 2025-04-09 09:33:35
* @Description: * @Description:
*/ */
import {defineConfig, loadEnv} from 'vite'; import { defineConfig, loadEnv } from 'vite';
import path from 'path'; import path from 'path';
import createVitePlugins from './vite/plugins'; import createVitePlugins from './vite/plugins';
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig (({mode, command}) => { export default defineConfig(({ mode, command }) => {
const env = loadEnv (mode, process.cwd ()); const env = loadEnv(mode, process.cwd());
const {VITE_APP_ENV} = env; const { VITE_APP_ENV } = env;
return { return {
// define: { // define: {
// // enable hydration mismatch details in production build // // enable hydration mismatch details in production build
@@ -19,15 +19,15 @@ export default defineConfig (({mode, command}) => {
// 部署生产环境和开发环境下的URL。 // 部署生产环境和开发环境下的URL。
// 默认情况下vite 会假设你的应用是被部署在一个域名的根路径上 // 默认情况下vite 会假设你的应用是被部署在一个域名的根路径上
// 例如 https://www.openHIS.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.openhis.vip/admin/,则设置 baseUrl 为 /admin/。 // 例如 https://www.openHIS.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.openhis.vip/admin/,则设置 baseUrl 为 /admin/。
base: VITE_APP_ENV === 'production' ? '/' : '/', base: VITE_APP_ENV === 'prd' ? '/' : '/',
plugins: createVitePlugins (env, command === 'build'), plugins: createVitePlugins(env, command === 'build'),
resolve: { resolve: {
// https://cn.vitejs.dev/config/#resolve-alias // https://cn.vitejs.dev/config/#resolve-alias
alias: { alias: {
// 设置路径 // 设置路径
'~': path.resolve (__dirname, './'), '~': path.resolve(__dirname, './'),
// 设置别名 // 设置别名
'@': path.resolve (__dirname, './src'), '@': path.resolve(__dirname, './src'),
}, },
// https://cn.vitejs.dev/config/#resolve-extensions // https://cn.vitejs.dev/config/#resolve-extensions
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'], extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
@@ -40,28 +40,24 @@ export default defineConfig (({mode, command}) => {
proxy: { proxy: {
// https://cn.vitejs.dev/config/#server-proxy // https://cn.vitejs.dev/config/#server-proxy
'/dev-api': { '/dev-api': {
target: 'http://localhost:18080/openhis',
// target: 'http://192.168.31.30:18080/openhis', // zwh
// target: 'http://192.168.31.50:18080/openhis', // wh
// target: 'http://192.168.31.190:18080/openhis', // yangmo
// target: 'http://60.188.247.175:18080/openhis',// 公网
changeOrigin: true,
rewrite: p => p.replace (/^\/dev-api/, ''),
},
'/ybplugin':{
target: 'http://localhost:5000',
changeOrigin: true,
rewrite: p => p.replace (/^\/ybplugin/, ''),
},
'/prod-api': {
target: 'http://localhost:18080/openhis',
changeOrigin: true,
rewrite: p => p.replace (/^\/prod-api/, ''),
},
'/test-api': {
target: 'http://localhost:18080/openhis', target: 'http://localhost:18080/openhis',
changeOrigin: true, changeOrigin: true,
rewrite: p => p.replace (/^\/test-api/, ''), rewrite: p => p.replace(/^\/dev-api/, ''),
},
'/ybplugin': {
target: 'http://localhost:5000',
changeOrigin: true,
rewrite: p => p.replace(/^\/ybplugin/, ''),
},
'/prd-api': {
target: 'http://localhost:18082/openhis',
changeOrigin: true,
rewrite: p => p.replace(/^\/prd-api/, ''),
},
'/test-api': {
target: 'http://localhost:18081/openhis',
changeOrigin: true,
rewrite: p => p.replace(/^\/test-api/, ''),
} }
}, },
}, },
@@ -74,7 +70,7 @@ export default defineConfig (({mode, command}) => {
AtRule: { AtRule: {
charset: atRule => { charset: atRule => {
if (atRule.name === 'charset') { if (atRule.name === 'charset') {
atRule.remove (); atRule.remove();
} }
}, },
}, },