From 17e47e074e622a0925c77bb937e3478e205a8903 Mon Sep 17 00:00:00 2001 From: Vben Date: Wed, 7 Jul 2021 23:47:47 +0800 Subject: [PATCH] chore: add a multi-environment configuration example --- .env.test | 36 ++++++++++++++++++++++++++++++++++++ CHANGELOG.zh_CN.md | 5 +++++ package.json | 1 + 3 files changed, 42 insertions(+) create mode 100644 .env.test diff --git a/.env.test b/.env.test new file mode 100644 index 00000000..469b307d --- /dev/null +++ b/.env.test @@ -0,0 +1,36 @@ +NODE_ENV=production +# Whether to open mock +VITE_USE_MOCK = true + +# public path +VITE_PUBLIC_PATH = / + +# Delete console +VITE_DROP_CONSOLE = true + +# Whether to enable gzip or brotli compression +# Optional: gzip | brotli | none +# If you need multiple forms, you can use `,` to separate +VITE_BUILD_COMPRESS = 'none' + +# Whether to delete origin files when using compress, default false +VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false + +# Basic interface address SPA +VITE_GLOB_API_URL=/basic-api + +# File upload address, optional +# It can be forwarded by nginx or write the actual address directly +VITE_GLOB_UPLOAD_URL=/upload + +# Interface prefix +VITE_GLOB_API_URL_PREFIX= + +# Whether to enable image compression +VITE_USE_IMAGEMIN= true + +# use pwa +VITE_USE_PWA = false + +# Is it compatible with older browsers +VITE_LEGACY = false diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md index 0a249fcf..9891a662 100644 --- a/CHANGELOG.zh_CN.md +++ b/CHANGELOG.zh_CN.md @@ -5,6 +5,11 @@ - 修复树形表格的带有展开图标的单元格的内容对齐问题 - **AppSearch** 修复可能会搜索隐藏菜单的问题 - **其它** 修复菜单默认折叠的配置不起作用的问题 +- 修复 safari 浏览器报错导致网站打不开 + +### 🎫 Chores + +- 添加 test 环境测试命令 ## 2.6.0(2021-07-04) diff --git a/package.json b/package.json index 8405e1a3..8a3532b9 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "serve": "npm run dev", "dev": "vite", "build": "cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts", + "build:test": "cross-env vite build --mode test && esno ./build/script/postBuild.ts", "build:no-cache": "yarn clean:cache && npm run build", "report": "cross-env REPORT=true npm run build", "type:check": "vue-tsc --noEmit --skipLibCheck", -- GitLab