Skip to content

Commit 0414018

Browse files
committed
📱 浏览器兼容性修复
1 parent 1b7d0be commit 0414018

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

presets/tov.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export default () => {
5252
legacy({
5353
targets: ['defaults', 'not IE 11', 'chrome 49'], //需要兼容的目标列表,可以设置多个
5454
additionalLegacyPolyfills: ['regenerator-runtime/runtime'],
55+
modernPolyfills: ['es.global-this'],
5556
renderLegacyChunks: true
5657
}),
5758
// 模块自动加载

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineConfig({
1010
},
1111
build: {
1212
target: ['es2015'],
13-
cssTarget: ['es2015']
13+
cssTarget: ['chrome49']
1414
},
1515
define: {
1616
'process.env': {}

0 commit comments

Comments
 (0)