提交 e2664f60 作者: vben

perf: improve legacy compatibility

上级 225bd4c3
...@@ -32,4 +32,4 @@ VITE_USE_IMAGEMIN= true ...@@ -32,4 +32,4 @@ VITE_USE_IMAGEMIN= true
VITE_USE_PWA = false VITE_USE_PWA = false
# Is it compatible with older browsers # Is it compatible with older browsers
VITE_LEGACY = false VITE_LEGACY = true
...@@ -37,7 +37,21 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { ...@@ -37,7 +37,21 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
!isBuild && vitePlugins.push(configHmrPlugin()); !isBuild && vitePlugins.push(configHmrPlugin());
// @vitejs/plugin-legacy // @vitejs/plugin-legacy
VITE_LEGACY && isBuild && vitePlugins.push(legacy()); VITE_LEGACY &&
isBuild &&
vitePlugins.push(
legacy({
targets: [
'Android > 39',
'Chrome >= 60',
'Safari >= 10.1',
'iOS >= 10.3',
'Firefox >= 54',
'Edge >= 15',
],
additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
})
);
// vite-plugin-html // vite-plugin-html
vitePlugins.push(configHtmlPlugin(viteEnv, isBuild)); vitePlugins.push(configHtmlPlugin(viteEnv, isBuild));
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
}, },
"dependencies": { "dependencies": {
"@iconify/iconify": "^2.0.3", "@iconify/iconify": "^2.0.3",
"@logicflow/core": "^0.6.1", "@logicflow/core": "^0.6.4",
"@logicflow/extension": "^0.6.1", "@logicflow/extension": "^0.6.4",
"@vueuse/core": "^5.1.4", "@vueuse/core": "^5.2.0",
"@zxcvbn-ts/core": "^1.0.0-beta.0", "@zxcvbn-ts/core": "^1.0.0-beta.0",
"ant-design-vue": "2.2.2", "ant-design-vue": "2.2.2",
"axios": "^0.21.1", "axios": "^0.21.1",
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
"mockjs": "^1.1.0", "mockjs": "^1.1.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"path-to-regexp": "^6.2.0", "path-to-regexp": "^6.2.0",
"pinia": "^2.0.0-beta.5", "pinia": "2.0.0-beta.5",
"print-js": "^1.6.0", "print-js": "^1.6.0",
"qrcode": "^1.4.4", "qrcode": "^1.4.4",
"resize-observer-polyfill": "^1.5.1", "resize-observer-polyfill": "^1.5.1",
...@@ -58,10 +58,10 @@ ...@@ -58,10 +58,10 @@
"tinymce": "^5.8.2", "tinymce": "^5.8.2",
"vditor": "^3.8.6", "vditor": "^3.8.6",
"vue": "3.1.5", "vue": "3.1.5",
"vue-i18n": "9.1.6", "vue-i18n": "9.1.7",
"vue-json-pretty": "^2.0.2", "vue-json-pretty": "^2.0.2",
"vue-router": "^4.0.10", "vue-router": "^4.0.10",
"vue-types": "^4.0.0", "vue-types": "^4.0.1",
"xlsx": "^0.17.0" "xlsx": "^0.17.0"
}, },
"devDependencies": { "devDependencies": {
...@@ -77,18 +77,18 @@ ...@@ -77,18 +77,18 @@
"@types/jest": "^26.0.24", "@types/jest": "^26.0.24",
"@types/lodash-es": "^4.17.4", "@types/lodash-es": "^4.17.4",
"@types/mockjs": "^1.0.4", "@types/mockjs": "^1.0.4",
"@types/node": "^16.4.2", "@types/node": "^16.4.6",
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.4.1", "@types/qrcode": "^1.4.1",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@types/sortablejs": "^1.10.7", "@types/sortablejs": "^1.10.7",
"@typescript-eslint/eslint-plugin": "^4.28.4", "@typescript-eslint/eslint-plugin": "^4.28.5",
"@typescript-eslint/parser": "^4.28.4", "@typescript-eslint/parser": "^4.28.5",
"@vitejs/plugin-legacy": "^1.4.4", "@vitejs/plugin-legacy": "^1.5.0",
"@vitejs/plugin-vue": "^1.2.5", "@vitejs/plugin-vue": "^1.3.0",
"@vitejs/plugin-vue-jsx": "^1.1.6", "@vitejs/plugin-vue-jsx": "^1.1.7",
"@vue/compiler-sfc": "3.1.5", "@vue/compiler-sfc": "3.1.5",
"@vue/test-utils": "^2.0.0-rc.10", "@vue/test-utils": "^2.0.0-rc.12",
"autoprefixer": "^10.3.1", "autoprefixer": "^10.3.1",
"commitizen": "^4.2.4", "commitizen": "^4.2.4",
"conventional-changelog-cli": "^2.1.1", "conventional-changelog-cli": "^2.1.1",
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
"ts-jest": "^27.0.4", "ts-jest": "^27.0.4",
"ts-node": "^10.1.0", "ts-node": "^10.1.0",
"typescript": "4.3.5", "typescript": "4.3.5",
"vite": "2.4.3", "vite": "2.4.4",
"vite-plugin-compression": "^0.3.1", "vite-plugin-compression": "^0.3.1",
"vite-plugin-html": "^2.0.7", "vite-plugin-html": "^2.0.7",
"vite-plugin-imagemin": "^0.4.1", "vite-plugin-imagemin": "^0.4.1",
...@@ -133,13 +133,13 @@ ...@@ -133,13 +133,13 @@
"vite-plugin-style-import": "^1.0.1", "vite-plugin-style-import": "^1.0.1",
"vite-plugin-svg-icons": "^1.0.1", "vite-plugin-svg-icons": "^1.0.1",
"vite-plugin-theme": "^0.8.1", "vite-plugin-theme": "^0.8.1",
"vue-eslint-parser": "^7.9.0", "vue-eslint-parser": "^7.10.0",
"vue-tsc": "^0.2.2" "vue-tsc": "^0.2.2"
}, },
"resolutions": { "resolutions": {
"//": "Used to install imagemin dependencies, because imagemin may not be installed in China. If it is abroad, you can delete it", "//": "Used to install imagemin dependencies, because imagemin may not be installed in China. If it is abroad, you can delete it",
"bin-wrapper": "npm:bin-wrapper-china", "bin-wrapper": "npm:bin-wrapper-china",
"rollup": "^2.53.3" "rollup": "^2.55.0"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论