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

[Taro Next] 部分机型h5页面报错 Uncaught SyntaxError: Unexpected token ... #6758

Closed
w91 opened this issue Jun 22, 2020 · 0 comments
Closed
Assignees
Milestone

Comments

@w91
Copy link

w91 commented Jun 22, 2020

问题描述

复现步骤

在部分低版本安卓浏览器打开Taro编译的h5页面,页面空白

期望行为

页面能正常打开

报错信息

fundebug抓到的报错信息 Uncaught SyntaxError: Unexpected token ... ,定位了下行号是taro里 packages/taro-components/h5/react/utils/reactify-wc.js 的代码。

系统信息

System:
OS: macOS 10.14.6
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.16.3 - ~/.nvm/versions/node/v12.16.3/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - ~/.nvm/versions/node/v12.16.3/bin/npm
npmPackages:
@tarojs/cli: 3.0.0-rc.5 => 3.0.0-rc.5
@tarojs/components: 3.0.0-rc.5 => 3.0.0-rc.5
@tarojs/mini-runner: 3.0.0-rc.5 => 3.0.0-rc.5
@tarojs/react: 3.0.0-rc.5 => 3.0.0-rc.5
@tarojs/runtime: 3.0.0-rc.5 => 3.0.0-rc.5
@tarojs/taro: 3.0.0-rc.5 => 3.0.0-rc.5
@tarojs/webpack-runner: 3.0.0-rc.5 => 3.0.0-rc.5
babel-preset-taro: 3.0.0-rc.5 => 3.0.0-rc.5
eslint-config-taro: 3.0.0-rc.5 => 3.0.0-rc.5
eslint-plugin-taro: 2.0.7 => 2.0.7
react: ^16.13.1 => 16.13.1
taro-ui: NervJS/taro-ui#next => 2.2.4

补充信息

看了下源码,packages/taro-components/h5/react/utils/reactify-wc.js 文件里有用到 ... 操作符,但是babel.config.js里没有加 @babel/plugin-transform-spread ,应该加上就好了

如果您有功能上的建议,可以提到 FeatHub

使用上的问题,欢迎在「Taro 社区」一起交流

@w91 w91 added the H5 label Jun 22, 2020
@Chen-jj Chen-jj added this to the 3.0.0 milestone Jun 28, 2020
@Chen-jj Chen-jj assigned Chen-jj and unassigned Littly Jun 28, 2020
yuche pushed a commit that referenced this issue Jun 30, 2020
* fix(components): 组件库各框架适配层先走 babel 编译, fix #6758

* fix(components): 修复组件样式

* fix: remove babel dep
@Chen-jj Chen-jj closed this as completed Jun 30, 2020
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

3 participants