哪些版本的iOS和Android Web视图已经支持ES6模块? [英] Which versions of iOS and Android webviews already support ES6 modules?
问题描述
我一直想知道哪些os/webview版本已经本地支持ES6模块(导入/导出功能),而不必通过webpack/babel转换为ES5.
I've been wondering which os/webview versions already support ES6 modules (import/export feature) natively without having to transpile to ES5 via webpack/babel.
请注意,我询问的是本机Webview支持(针对Cordova/PhoneGap),以及关于移动浏览器支持(例如Safari或Chrome)的 不是 .
Please note that I'm asking about native webview support (for Cordova/PhoneGap) and not for mobile browser support such as Safari or Chrome.
我听说iOS 10.3确实支持它,但是我不确定,对于Android的当前状态我也一无所知.
I heard that iOS 10.3 does support it but I'm not sure, also I'm absolutely clueless regarding the current state on Android.
找不到在谷歌上搜索的明确答案.有人对此有确切的信息,或者至少有指向要阅读的资源的链接吗?
Couldn't find a clear answer googling around. Does someone have exact information on this or at least a link to a resource to read?
推荐答案
根据我的发现,截至2017年5月的当前状态如下:
From what I found out, the current state as of May 2017 is like this:
iOS
UIWebView:不支持
UIWebView: No support
WKWebView:
WKWebView:
-
从文件:///提供服务时,
- CORS错误 通过Cordova中的本地http服务器插件提供服务时,出现
- 403错误
- 通过/external/提供服务
- CORS error when served from file:///
- 403 error when served via local http server plugin in Cordova
- Serving from /external/ works
Android
完全不支持Webview
No support in webview at all
浏览器要好一些,并且可以获得支持,请参阅 https://jakearchibald.com/2017/es-modules-in-browsers/
Browsers are a bit better and catch up on support, see https://jakearchibald.com/2017/es-modules-in-browsers/
这篇关于哪些版本的iOS和Android Web视图已经支持ES6模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!