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

低版本的Android浏览器显示白屏 #2426

Closed
FingersKey opened this issue Jan 18, 2018 · 7 comments
Closed

低版本的Android浏览器显示白屏 #2426

FingersKey opened this issue Jan 18, 2018 · 7 comments

Comments

@FingersKey
Copy link

FingersKey commented Jan 18, 2018

console错误:Uncaught SyntaxError: Use of const in strict mode.
手机:HUAWEI MATE7
Android Version: 4.4.2
OS Version: EMUI 3.0

运行的就是文档提供的快速开始。

@Jiiiiiin
Copy link

Jiiiiiin commented Jan 19, 2018

不同的orm厂商阉割之后(这个说法不对应该是低版本android webview使用的是webkit内核,对于es6的兼容或者css3的兼容都不如高版本的chromiun内核)webview对es6的支持都不一样的,const关键字明显不能再你的那台机器执行,建议放弃对5.0以下系统的支持,不然你躺过这个坑还会遇到下一个坑。
说服自己的老板吧。
祝你好运 😄
@FingersKey

@brahmachen
Copy link

babel不是将const转为var了吗? @Jiiiiiin

@FingersKey
Copy link
Author

@brahmachen 编译出来的没有问题, 开发环境下

@brahmachen
Copy link

开发环境不会转码吗?不太合理啊?

@Jiiiiiin
Copy link

@brahmachen 当然会,这就要看这位同学贴出来的异常时怎么出来的了。

@Jiiiiiin
Copy link

lcxfs1991/blog#9

@airyland
Copy link
Owner

babel 会转换 const 为 var。看描述没有可重现的说明,尝试升级 node 版本,检查开发时构建的开发文件是否还保留 const 关键字,这里先关闭了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants