NervJS / taro

开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
https://docs.taro.zone/
Other
35.31k stars 4.76k forks source link

编译成支付宝后打开项目,界面是白屏 #13015

Closed dzhiqin closed 1 year ago

dzhiqin commented 1 year ago

相关平台

支付宝小程序

复现仓库

git@github.com:dzhiqin/qlc-taro.git 小程序基础库: 1.25.8 使用框架: React

复现步骤

期望结果

编译后正常显示‘hello world’

实际结果

编译成支付宝后打开项目,界面是白屏

环境信息

  Taro CLI 3.5.10 environment info:
    System:
      OS: macOS 13.0.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
      Yarn: 1.22.19 - /opt/homebrew/bin/yarn
      npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.5.10 => 3.5.10
      @tarojs/components: 3.5.10 => 3.5.10
      @tarojs/helper: 3.5.10 => 3.5.10
      @tarojs/mini-runner: 3.5.10 => 3.5.10
      @tarojs/plugin-framework-react: 3.5.10 => 3.5.10
      @tarojs/plugin-platform-alipay: 3.5.10 => 3.5.10
      @tarojs/plugin-platform-jd: 3.5.10 => 3.5.10
      @tarojs/plugin-platform-qq: 3.5.10 => 3.5.10
      @tarojs/plugin-platform-swan: 3.5.10 => 3.5.10
      @tarojs/plugin-platform-tt: 3.5.10 => 3.5.10
      @tarojs/plugin-platform-weapp: 3.5.10 => 3.5.10
      @tarojs/react: 3.5.10 => 3.5.10
      @tarojs/router: 3.5.10 => 3.5.10
      @tarojs/runtime: 3.5.10 => 3.5.10
      @tarojs/shared: 3.5.10 => 3.5.10
      @tarojs/taro: 3.5.10 => 3.5.10
      @tarojs/taro-h5: 3.5.10 => 3.5.10
      @tarojs/webpack-runner: 3.5.10 => 3.5.10
      babel-preset-taro: 3.5.10 => 3.5.10
      eslint-config-taro: 3.5.10 => 3.5.10
      react: ^18.0.0 => 18.2.0
    npmGlobalPackages:
      typescript: 4.8.4
Chen-jj commented 1 year ago

@dzhiqin 是和 #12984 一样的报错么

dzhiqin commented 1 year ago

@dzhiqin 是和 #12984 一样的报错么

控制台没有看到报错信息,正常打开

Chen-jj commented 1 year ago

@dzhiqin 定位了一下,我想这和 #12984 的问题是一样的。是 Webpack4 会出现的问题,可以试试 webpack5。问题后续在 #12984 讨论的,这个 issue 先关闭哈