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

scss 样式文件 inner import 读取跨平台文件失效 #11983

Closed
shinken008 opened this issue Jun 24, 2022 · 1 comment · Fixed by #12150
Closed

scss 样式文件 inner import 读取跨平台文件失效 #11983

shinken008 opened this issue Jun 24, 2022 · 1 comment · Fixed by #12150
Assignees
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x

Comments

@shinken008
Copy link
Collaborator

相关平台

React Native

复现仓库

https://github.com/shinken008/taro-native-publish

使用框架: React

复现步骤

/* index.scss */
@import './color.scss';

存在 color.rn.scss 却不能读到 color.rn.scss

其他几个后缀,less,css 不受影响

期望结果

读到 rn 优先级文件 color.rn.scss

实际结果

读取的是 color.scss

环境信息

Taro CLI 3.4.12 environment info:
    System:
      OS: macOS 12.4
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 14.17.6 - ~/.nvm/versions/node/v14.17.6/bin/node
      Yarn: 1.22.17 - ~/.nvm/versions/node/v14.17.6/bin/yarn
      npm: 6.14.15 - ~/.nvm/versions/node/v14.17.6/bin/npm
    npmPackages:
      @tarojs/cli: 3.4.12 => 3.4.12 
      @tarojs/components: 3.4.12 => 3.4.12 
      @tarojs/mini-runner: 3.4.12 => 3.4.12 
      @tarojs/react: 3.4.12 => 3.4.12 
      @tarojs/rn-runner: 3.4.12 => 3.4.12 
      @tarojs/runtime: 3.4.12 => 3.4.12 
      @tarojs/taro: 3.4.12 => 3.4.12 
      @tarojs/taro-rn: 3.4.12 => 3.4.12 
      @tarojs/webpack-runner: 3.4.12 => 3.4.12 
      babel-preset-taro: 3.4.12 => 3.4.12 
      eslint-config-taro: 3.4.12 => 3.4.12 
      react: ^17.0.0 => 17.0.2 
      react-native: ~0.68.1 => 0.68.2 
    npmGlobalPackages:
      typescript: 4.5.5
@shinken008 shinken008 added the T-rn Target - 编译到 React Native label Jun 24, 2022
@taro-bot2 taro-bot2 bot added F-react Framework - React V-3 Version - 3.x labels Jun 24, 2022
@shinken008 shinken008 changed the title scss 样式文件 inner import 跨平台读取文件失效 scss 样式文件 inner import 读取跨平台文件失效 Jun 24, 2022
@shinken008
Copy link
Collaborator Author

删除 file 选项,sass版本锁定sass@1.37.5,1.38.0及以上会importer 处理失败,或者安装 node-sass。bug 追踪 sass/dart-sass#1764

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant