Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vite配置了legacy打包后在safari 15.1中仍无法使用 #11713

Closed
7 tasks done
zanxiaoyu opened this issue Jan 17, 2023 · 1 comment
Closed
7 tasks done

vite配置了legacy打包后在safari 15.1中仍无法使用 #11713

zanxiaoyu opened this issue Jan 17, 2023 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@zanxiaoyu
Copy link

Describe the bug

vite配置了legacy打包后在safari 15.1中仍无法使用
控制台报错.at() is undefined,at方法safari最低支持15.4,我本来想使用legacy兼容一下,结果打包后inex.html虽然有nomodule的script,但是在15.1的safari应该是支持module的,所以还是无法使用,在跳转页面时就会报错 .at() is undefined
这要怎么解决?另外请问vite打包什么时候能支持es5?

Reproduction

none

Steps to reproduce

No response

System Info

Safari浏览器
版本15.1(17612.2.9.1.20)

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red
Copy link
Member

Vite doesn't inject any polyfills for modern bundles. Also there isn't a way to make Safari 15.1 to use legacy bundles. (#6922)

The current intended way is to use modernPolyfills option.
https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#modernpolyfills

@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2023
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels Jan 17, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants