Giter Site home page Giter Site logo

RN端,项目配置config/index 中配置sass的全局样式文件后,RN端报错@use rules must be written before any other rules about taro-ui HOT 3 CLOSED

wukongyang avatar wukongyang commented on June 2, 2024
RN端,项目配置config/index 中配置sass的全局样式文件后,RN端报错@use rules must be written before any other rules

from taro-ui.

Comments (3)

taro-ui-bot avatar taro-ui-bot commented on June 2, 2024

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

from taro-ui.

wukongyang avatar wukongyang commented on June 2, 2024

RN端,无sass全局配置样式文件,可正常使用taro-ui

from taro-ui.

robinv8 avatar robinv8 commented on June 2, 2024

已向 taro 提 PR 修复该问题,目前可以使用 patch-package 包给对应的包打补丁,方案如下:

  1. 在项目根目录下创建 patches 文件夹
  2. 创建文件名为@tarojs+rn-style-transformer+{版本号}.patch,将「版本号」换成当前 taro 的版本号,常规情况下 @tarojs/rn-style-transformer 版本号与 taro 版本号一致,如果不一致可以通过 lock 文件自行查找
  3. 链接中的内容粘贴到已创建的文件中
  4. 安装 patch-package,并在 package.json scripts 下添加 "postinstall": "patch-package" 命令
  5. 执行 install

from taro-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.