Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
872bb84
commit 6143605
Showing
24 changed files
with
107 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
/** 请求环境配置 */ | ||
type ServiceEnv = Record<EnvType, EnvConfig>; | ||
type ServiceEnv = Record<ServiceEnvType, ServiceEnvConfig>; | ||
|
||
/** 环境配置 */ | ||
const serviceEnvConfig: ServiceEnv = { | ||
/** 不同服务的环境配置 */ | ||
const serviceEnv: ServiceEnv = { | ||
dev: { | ||
url: 'http://localhost:8080', | ||
proxy: '/api' | ||
proxy: '/proxy-flag' | ||
}, | ||
test: { | ||
url: 'http://localhost:8080', | ||
proxy: '/api' | ||
proxy: '/proxy-flag' | ||
}, | ||
prod: { | ||
url: 'http://localhost:8080', | ||
proxy: '/api' | ||
proxy: '/proxy-flag' | ||
} | ||
}; | ||
|
||
/** | ||
* 获取环境配置 | ||
* @param env 环境描述 | ||
* 获取当前模式的环境配置 | ||
* @param env 环境 | ||
*/ | ||
export function getEnvConfig(env: ImportMetaEnv) { | ||
const { VITE_ENV_TYPE = 'dev' } = env; | ||
|
||
const envConfig = serviceEnvConfig[VITE_ENV_TYPE]; | ||
const envConfig = serviceEnv[VITE_ENV_TYPE]; | ||
|
||
return envConfig; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
VITE_HTTP_PROXY=1 | ||
VITE_HTTP_PROXY=Y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
VITE_VISUALIZER=0 | ||
VITE_VISUALIZER=N | ||
|
||
VITE_COMPRESS=0 | ||
VITE_COMPRESS=N | ||
|
||
# gzip | brotliCompress | deflate | deflateRaw | ||
VITE_COMPRESS_TYPE=gzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,5 @@ stats.html | |
|
||
/src/typings/components.d.ts | ||
pnpm-lock.yaml | ||
package-lock.json | ||
yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
6143605
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
soybean-admin – ./
soybean-admin.vercel.app
soybean-admin-honghuangdc.vercel.app
soybean.pro
www.soybean.pro
soybean-admin-git-main-honghuangdc.vercel.app