-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
fix: 修复现代浏览器不支持catch optional #10052
fix: 修复现代浏览器不支持catch optional #10052
Conversation
I don't think this is needed. Optional catch binding is supported by all default target browsers. vite/packages/vite/src/node/constants.ts Lines 17 to 23 in e66cf69
https://caniuse.com/mdn-javascript_statements_try_catch_optional_catch_binding |
I fixed the problem in my project just a few hours ago(Android 9 Webview), but my solution is ugly. ` |
OK. I now understand the problem. Current default target browsers (A): So features supported in A but not in B will be used in modern chunks and will break users using B. It seems the difference comes from #2976. |
I think there's three options here.
|
Thank you for the answer :) |
So, in current, option |
Yes. |
Description
支持module,但是不支持 catch optional的低版本浏览器会导致程序不能正常运行
在浏览器判断处新增catch optional场景
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).