taro icon indicating copy to clipboard operation
taro copied to clipboard

replaceWith is not a function

Open gyf30827 opened this issue 3 years ago • 3 comments

相关平台

H5

**浏览器版本: chrome 42.0.2311.138 **taro-ui: 1.1 使用框架: React

复现步骤

在低版本浏览器中 @tarojs/router 下的createRouter 下的 init 中的 replaceWIth 会报错

期望结果

不报错

实际结果

报错 报 _a.replaceWith is not a function

环境信息


  Taro CLI 3.3.3 environment info:
    System:
      OS: macOS 11.5.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
    npmPackages:
      @tarojs/cli: ^3.3.3 => 3.3.3 
      @tarojs/components: 3.3.3 => 3.3.3 
      @tarojs/mini-runner: 3.3.3 => 3.3.3 
      @tarojs/react: 3.3.3 => 3.3.3 
      @tarojs/runtime: 3.3.3 => 3.3.3 
      @tarojs/taro: 3.3.3 => 3.3.3 
      @tarojs/webpack-runner: 3.3.3 => 3.3.3 
      babel-plugin-transform-taroapi: ^3.3.3 => 3.3.3 
      react: ^17.0.0 => 17.0.2 
      taro-ui: 3.0.0-alpha.3 => 3.0.0-alpha.3 

gyf30827 avatar Sep 15 '22 03:09 gyf30827

image image

gyf30827 avatar Sep 15 '22 03:09 gyf30827

CanIUse 上显示,Chrome53之前都不支持了

AdvancedCat avatar Sep 16 '22 02:09 AdvancedCat

这个可以自行配置 browserslist 优化吧

ZakaryCode avatar Sep 21 '22 06:09 ZakaryCode