-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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中:export后,RN端运行出错 #1848
Comments
欢迎提交 Issue~ 如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏 如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。 Good luck and happy coding~ |
CC @Pines-Cheng |
sass 有 :export 用法吗?我在官方文档里面没有找到啊。 |
参考 https://til.hashrocket.com/posts/sxbrscjuqu-share-scss-variables-with-javascript |
这种实现是借助了 Webpack 和 CSS modules 的能力。 |
是的。。。现在怎么解决这个呢? |
RN 端搞不了~😢 |
在实际进行RN开发中,scss变量作为theme参数,在js中共享这种场景很难避免啊。。。能否修复下这个问题? https://til.hashrocket.com/posts/sxbrscjuqu-share-scss-variables-with-javascript |
现在官方已经fork了css-react-native,应该是能解决这种问题了? |
为了方便在scss和js中共享变量,我在scss中使用:export来导出一些变量给JS使用。
然后在RN端运行遇到一些问题,一进入模拟器就会报错:
系统信息
Taro CLI 1.2.4 environment info:
System:
OS: macOS 10.14.2
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.11.0 - /usr/local/bin/node
Yarn: 1.3.2 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
npmGlobalPackages:
typescript: 2.4.2
补充信息
看页面提示,是因为StyleSheet中创建的样式,不是对象格式
The text was updated successfully, but these errors were encountered: