Skip to content

Commit

Permalink
feat: 打包后的文件提供传统浏览器兼容性支持
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 committed Dec 15, 2021
1 parent 39159d5 commit eb0771e
Show file tree
Hide file tree
Showing 6 changed files with 1,463 additions and 3,302 deletions.
3 changes: 3 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ VITE_ROUTER_HISTORY = "hash"

# 线上环境后端地址
VITE_PROXY_DOMAIN_REAL = ""

# 是否为打包后的文件提供传统浏览器兼容性支持 支持 true 不支持 false
VITE_LEGACY = false
3 changes: 2 additions & 1 deletion build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const warpperEnv = (envConf: Recordable): ViteEnv => {
VITE_PUBLIC_PATH: "",
VITE_PROXY_DOMAIN: "",
VITE_PROXY_DOMAIN_REAL: "",
VITE_ROUTER_HISTORY: ""
VITE_ROUTER_HISTORY: "",
VITE_LEGACY: false
};

for (const envName of Object.keys(envConf)) {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "4.31.0",
"@typescript-eslint/parser": "4.31.0",
"@vitejs/plugin-legacy": "^1.6.4",
"@vitejs/plugin-vue": "^1.10.2",
"@vitejs/plugin-vue-jsx": "^1.3.1",
"@vue/compiler-sfc": "^3.2.24",
Expand Down
Loading

0 comments on commit eb0771e

Please sign in to comment.