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 3.5.5 编译支付宝小程序报错 #12522

Open
zsytssk opened this issue Sep 19, 2022 · 2 comments
Open

taro 3.5.5 编译支付宝小程序报错 #12522

zsytssk opened this issue Sep 19, 2022 · 2 comments
Labels
F-react Framework - React question Further information is requested T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x

Comments

@zsytssk
Copy link

zsytssk commented Sep 19, 2022

相关平台

支付宝小程序

复现仓库

https://github.com/
小程序基础库: 2.0
使用框架: React

复现步骤

支付宝开发者工具版本 3.1.3 (3.1.3),
yarn run:alipay
然后支付宝小程序中预览直接报错;但是 yarn dev:alipay 是正常的。
原因是编译后会生成了一个common.acss文件,这个文件在app.acss中引用, build之后 所有的app.acss只有一行,@import "./common.acss"; 在这行末尾,这时就会报错。

期望结果

app.acss中把@import "./common.acss";放在第二行

实际结果

app.acss只有一行@import "./common.acss";在末尾

环境信息

Taro v3.5.5


  Taro CLI 3.5.5 environment info:
    System:
      OS: macOS 12.5.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.16.0 - /opt/homebrew/Cellar/node@16/16.16.0/bin/node
      Yarn: 1.22.19 - /opt/homebrew/bin/yarn
      npm: 8.11.0 - /opt/homebrew/Cellar/node@16/16.16.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.5.5 => 3.5.5 
      @tarojs/components: 3.5.5 => 3.5.5 
      @tarojs/helper: 3.5.5 => 3.5.5 
      @tarojs/plugin-framework-react: 3.5.5 => 3.5.5 
      @tarojs/plugin-platform-alipay: 3.5.5 => 3.5.5 
      @tarojs/plugin-platform-jd: 3.5.5 => 3.5.5 
      @tarojs/plugin-platform-qq: 3.5.5 => 3.5.5 
      @tarojs/plugin-platform-swan: 3.5.5 => 3.5.5 
      @tarojs/plugin-platform-tt: 3.5.5 => 3.5.5 
      @tarojs/plugin-platform-weapp: 3.5.5 => 3.5.5 
      @tarojs/react: 3.5.5 => 3.5.5 
      @tarojs/router: 3.5.5 => 3.5.5 
      @tarojs/runtime: 3.5.5 => 3.5.5 
      @tarojs/shared: 3.5.5 => 3.5.5 
      @tarojs/taro: 3.5.5 => 3.5.5 
      @tarojs/taro-h5: 3.5.5 => 3.5.5 
      @tarojs/webpack5-runner: 3.5.5 => 3.5.5 
      babel-preset-taro: 3.5.5 => 3.5.5 
      react: ^18.0.0 => 18.2.0 
@Chen-jj Chen-jj added question Further information is requested V-3 Version - 3.x F-react Framework - React T-alipay Target - 编译到支付宝小程序 labels Sep 19, 2022
@Chen-jj
Copy link
Contributor

Chen-jj commented Sep 19, 2022

@zsytssk 麻烦提供一下 demo

@zsytssk
Copy link
Author

zsytssk commented Sep 20, 2022

@zsytssk 麻烦提供一下 demo

公司的项目 不好搞demo, 你把我的信息给开发看下,他应该就明白了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React question Further information is requested T-alipay Target - 编译到支付宝小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

2 participants