无法使用babel/preset-env polyfly`object.fromentries`
我是否误解了有关babel/preset-env
的某些内容? 我正在使用vitejs/plugin-leggacy
使用babel配置来进行VITE,但用于Astrojs项目。
plugins: [
legacy({
targets: ['defaults', 'not IE 11', 'ios_saf > 10']
})
]
从我的理解来看,简单地指定浏览列表查询应该足以使Babel产生适当的多填充:
我们利用这些数据源来维护哪种版本的我们支持的目标环境获得了对JavaScript语法或浏览器功能的支持,以及这些语法和功能的映射到Babel Transform Transform插件和Core-js Polyfills。<<<<<<<<<<< /p>
如果object.fromentries
不支持ios_saf&lt; 12
,但是是ECMA 2019的一部分,为什么我的测试浏览器(IS_SAF 11)为此功能引起了错误?
Am I misunderstanding something about or misconfiguring babel/preset-env
?
I'm using babel configs for vite using vitejs/plugin-legacy
, but for AstroJS project.
plugins: [
legacy({
targets: ['defaults', 'not IE 11', 'ios_saf > 10']
})
]
From my understanding, simply specifying the browserslist query should be enough for babel to generate the appropriate polyfills:
We leverage these data sources to maintain mappings of which version of our supported target environments gained support of a JavaScript syntax or browser feature, as well as a mapping of those syntaxes and features to Babel transform plugins and core-js polyfills.
If Object.fromEntries
is not supported in ios_saf < 12
but is part of the ECMA 2019, why does my test browser (which is ios_saf 11) raise an error for this function?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论