Commit 17e47e074e622a0925c77bb937e3478e205a8903
1 parent
dafcdd89
chore: add a multi-environment configuration example
Showing
3 changed files
with
42 additions
and
0 deletions
.env.test
0 → 100644
1 | +NODE_ENV=production | |
2 | +# Whether to open mock | |
3 | +VITE_USE_MOCK = true | |
4 | + | |
5 | +# public path | |
6 | +VITE_PUBLIC_PATH = / | |
7 | + | |
8 | +# Delete console | |
9 | +VITE_DROP_CONSOLE = true | |
10 | + | |
11 | +# Whether to enable gzip or brotli compression | |
12 | +# Optional: gzip | brotli | none | |
13 | +# If you need multiple forms, you can use `,` to separate | |
14 | +VITE_BUILD_COMPRESS = 'none' | |
15 | + | |
16 | +# Whether to delete origin files when using compress, default false | |
17 | +VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false | |
18 | + | |
19 | +# Basic interface address SPA | |
20 | +VITE_GLOB_API_URL=/basic-api | |
21 | + | |
22 | +# File upload address, optional | |
23 | +# It can be forwarded by nginx or write the actual address directly | |
24 | +VITE_GLOB_UPLOAD_URL=/upload | |
25 | + | |
26 | +# Interface prefix | |
27 | +VITE_GLOB_API_URL_PREFIX= | |
28 | + | |
29 | +# Whether to enable image compression | |
30 | +VITE_USE_IMAGEMIN= true | |
31 | + | |
32 | +# use pwa | |
33 | +VITE_USE_PWA = false | |
34 | + | |
35 | +# Is it compatible with older browsers | |
36 | +VITE_LEGACY = false | ... | ... |
CHANGELOG.zh_CN.md
package.json
... | ... | @@ -11,6 +11,7 @@ |
11 | 11 | "serve": "npm run dev", |
12 | 12 | "dev": "vite", |
13 | 13 | "build": "cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts", |
14 | + "build:test": "cross-env vite build --mode test && esno ./build/script/postBuild.ts", | |
14 | 15 | "build:no-cache": "yarn clean:cache && npm run build", |
15 | 16 | "report": "cross-env REPORT=true npm run build", |
16 | 17 | "type:check": "vue-tsc --noEmit --skipLibCheck", | ... | ... |