taro 4.0.4版本按照官网文档初始化项目,增加project.alipay.json,执行npm run dev:alipay后在支付宝开发工具中无法预览

ha5z0ras  于 3个月前  发布在  其他
关注(0)|答案(1)|浏览(54)

相关平台

支付宝小程序

小程序基础库: 2.0
使用框架: React

复现步骤

按照官网文档初始化一个taro项目,react ts less 默认模版

期望结果

可以正常预览

实际结果

无法正常预览

环境信息

Taro CLI 4.0.4 environment info:
    System:
      OS: macOS 14.5
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.20.4 - ~/.volta/tools/image/node/18.20.4/bin/node
      Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
      npm: 10.7.0 - ~/.volta/tools/image/node/18.20.4/bin/npm
    npmPackages:
      @tarojs/cli: ^4.0.4 => 4.0.4 
      @tarojs/components: 4.0.4 => 4.0.4 
      @tarojs/helper: 4.0.4 => 4.0.4 
      @tarojs/plugin-framework-react: 4.0.4 => 4.0.4 
      @tarojs/plugin-html: ^4.0.4 => 4.0.4 
      @tarojs/plugin-platform-alipay: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-h5: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-harmony-hybrid: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-jd: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-qq: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-swan: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-tt: 4.0.4 => 4.0.4 
      @tarojs/plugin-platform-weapp: 4.0.4 => 4.0.4 
      @tarojs/react: 4.0.4 => 4.0.4 
      @tarojs/runtime: 4.0.4 => 4.0.4 
      @tarojs/shared: 4.0.4 => 4.0.4 
      @tarojs/taro: 4.0.4 => 4.0.4 
      @tarojs/taro-loader: 4.0.4 => 4.0.4 
      @tarojs/webpack5-runner: 4.0.4 => 4.0.4 
      babel-preset-taro: 4.0.4 => 4.0.4 
      eslint-config-taro: 4.0.4 => 4.0.4 
      react: ^18.0.0 => 18.3.1
m3eecexj

m3eecexj1#

https://opendocs.alipay.com/mini/03dbc3#transpile

mini.project.json 加下这个配置

相关问题