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

h5运行环境下,采用taro3.5.4 webpack5打包,webpack-runner5中resolve-url-loader版本为4,里面postcss还是7.x导致不匹配报错 #12388

Open
tan2009216028 opened this issue Aug 26, 2022 · 1 comment
Labels
E-easy Helper Wanted - Easy F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x

Comments

@tan2009216028
Copy link

相关平台

H5

复现仓库

https://github.com/HowToLiveLonger.git
浏览器版本: chrome
使用框架: React

复现步骤

场景:h5运行环境下,采用taro3.5.4 webpack5打包,其中scss引入@import 'normalize.css',采用引入方式

现象:报错提示postcss版本不一致

原因:webpack-runner5中resolve-url-loader版本为4,里面postcss还是7.x导致不匹配报错,建议resolve-url-loader升级最新5版本

提示:仓库地址不存在的,不要看,问题简单明了,无需demo

期望结果

采用类似@import 'normalize.css'的引入方式能够正确编译

实际结果

报错提示不通过

环境信息

本地业务工程taro-cli 3.5.4

  Taro CLI 3.5.4 environment info:
    System:
      OS: macOS 11.6
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 14.17.6 - ~/.nvm/versions/node/v14.17.6/bin/node
      Yarn: 1.22.11 - /usr/local/bin/yarn
      npm: 7.22.0 - ~/.nvm/versions/node/v14.17.6/bin/npm
    npmPackages:
      @tarojs/cli: ^3.5.4 => 3.5.4 
      @tarojs/components: 3.5.4 => 3.5.4 
      @tarojs/helper: 3.5.4 => 3.5.4 
      @tarojs/plugin-framework-react: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-alipay: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-jd: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-qq: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-swan: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-tt: 3.5.4 => 3.5.4 
      @tarojs/plugin-platform-weapp: 3.5.4 => 3.5.4 
      @tarojs/react: 3.5.4 => 3.5.4 
      @tarojs/router: 3.5.4 => 3.5.4 
      @tarojs/runtime: 3.5.4 => 3.5.4 
      @tarojs/shared: 3.5.4 => 3.5.4 
      @tarojs/taro: 3.5.4 => 3.5.4 
      @tarojs/taro-h5: 3.5.4 => 3.5.4 
      @tarojs/taro-loader: 3.5.4 => 3.5.4 
      babel-preset-taro: 3.5.4 => 3.5.4 
      eslint-config-taro: 3.5.4 => 3.5.4 
      react: ^18.2.0 => 18.2.0 

@taro-bot2 taro-bot2 bot added F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x labels Aug 26, 2022
@Chen-jj Chen-jj added the E-easy Helper Wanted - Easy label Aug 29, 2022
@kaifa-yang
Copy link

解惑了吗,帮我看看#12432 (comment)

@ZakaryCode ZakaryCode moved this to Padding in H5 Apr 10, 2023
@ZakaryCode ZakaryCode added this to H5 Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Helper Wanted - Easy F-react Framework - React T-h5 Target - 编译到 H5 V-3 Version - 3.x
Projects
Status: Padding
Development

No branches or pull requests

3 participants