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

能不能支持sass呢,急求~ #268

Closed
thisXY opened this issue Oct 23, 2020 · 9 comments
Closed

能不能支持sass呢,急求~ #268

thisXY opened this issue Oct 23, 2020 · 9 comments

Comments

@thisXY
Copy link

thisXY commented Oct 23, 2020

能不能支持sass呢,急求~

@PeachScript
Copy link
Member

rollup 模式支持的:https://github.com/umijs/father#sassinrollupmode

@thisXY
Copy link
Author

thisXY commented Oct 29, 2020

rollup 模式支持的:https://github.com/umijs/father#sassinrollupmode

试了不行呢,能简单给个配置demo吗,感谢!

@thisXY
Copy link
Author

thisXY commented Nov 2, 2020

https://github.com/umijs/father/tree/master/packages/father-build/src/fixtures/build/rollup-sass

我也是这样配置的,但一直都是如图提示报错,请问是不是对node-sass的版本有要求
微信图片_20201102101506

@PeachScript
Copy link
Member

PeachScript commented Nov 2, 2020

这是说 sass 配置要放进 sassOptions 吧,顶层配置是传给 sass-loader 的,具体可以看下 sass-loader 的配置项

@thisXY
Copy link
Author

thisXY commented Nov 9, 2020

发现确实是对sass-loader版本有限制,目前降级到@^7.3.1解决了
laravel-mix/laravel-mix#2206

@PeachScript
Copy link
Member

发现确实是对sass-loader版本有限制,目前降级到@^7.3.1解决了
JeffreyWay/laravel-mix#2206

#274 合并升级到 rollup 2 后就能解锁版本了

@thisXY
Copy link
Author

thisXY commented Nov 10, 2020

发现确实是对sass-loader版本有限制,目前降级到@^7.3.1解决了
JeffreyWay/laravel-mix#2206

#274 合并升级到 rollup 2 后就能解锁版本了

谢谢!还有个问题:
关于配置cssModules:默认是 .module.css 走 css modules,.css 不走 css modules。配置 cssModules 为 true 后,全部 css 文件都走 css modules。(less 文件同理)
如何配置使得.module.sass走css modules,其他都不走呢,我试了关于sass的,要么都走要么都不走

@PeachScript
Copy link
Member

已升级到 rollup 2,可以解锁版本了;sass 的部分能力可能是对不齐的,可以在 postcss-plugin 的仓库里找找看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants