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-cli新建项目,在低版本浏览器报错 e.endsWith is not a function #16200

Open
Vera1128 opened this issue Jul 29, 2024 · 3 comments
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@Vera1128
Copy link

相关平台

H5

浏览器版本: 安卓10 自带浏览器
使用框架: React

复现步骤

使用taro-cli创建了一个项目,代码见https://github.com/Vera1128/myApp
拉取代码,yarn install, yarn run dev-h5, 然后在OPPO r15手机默认浏览器打开

期望结果

能正常访问页面

实际结果

图片alt

环境信息

Taro v3.6.29


  Taro CLI 3.6.29 environment info:
    System:
      OS: macOS 12.7.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.14.0 - /usr/local/bin/node
      Yarn: 1.22.22 - /usr/local/bin/yarn
      npm: 8.3.1 - /usr/local/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.29 => 3.6.29 
      @tarojs/components: 3.6.29 => 3.6.29 
      @tarojs/helper: 3.6.29 => 3.6.29 
      @tarojs/plugin-framework-react: 3.6.29 => 3.6.29 
      @tarojs/plugin-platform-alipay: 3.6.29 => 3.6.29 
      @tarojs/plugin-platform-h5: 3.6.29 => 3.6.29 
      @tarojs/plugin-platform-jd: 3.6.29 => 3.6.29 
      @tarojs/plugin-platform-qq: 3.6.29 => 3.6.29 
      @tarojs/plugin-platform-swan: 3.6.29 => 3.6.29 
      @tarojs/plugin-platform-tt: 3.6.29 => 3.6.29 
      @tarojs/plugin-platform-weapp: 3.6.29 => 3.6.29 
      @tarojs/react: 3.6.29 => 3.6.29 
      @tarojs/runtime: 3.6.29 => 3.6.29 
      @tarojs/shared: 3.6.29 => 3.6.29 
      @tarojs/taro: 3.6.29 => 3.6.29 
      @tarojs/taro-loader: 3.6.29 => 3.6.29 
      @tarojs/webpack-runner: ^3.6.34 => 3.6.34 
      @tarojs/webpack5-runner: 3.6.29 => 3.6.29 
      babel-preset-taro: 3.6.29 => 3.6.29 
      eslint-config-taro: 3.6.29 => 3.6.29 
      react: ^18.0.0 => 18.3.1 
    npmGlobalPackages:
      typescript: 5.4.5
@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Jul 29, 2024
@github-project-automation github-project-automation bot moved this to Padding in H5 Jul 29, 2024
@Vera1128
Copy link
Author

看上去感觉像webpack5编译的问题,我用之前3.3.4的版本看了下是没问题的,用3.6+的版本看就有问题了,请问这个要怎么弄呢

@gMorning-Wp
Copy link

需要配置更广的pollyfill,可以尝试在babel环处理一下

@Vera1128
Copy link
Author

Vera1128 commented Jul 31, 2024 via email

This was referenced Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Status: Padding
Development

No branches or pull requests

2 participants