rspack icon indicating copy to clipboard operation
rspack copied to clipboard

[Feature Request]: 原生css 支持 css loader的更多配置

Open crazyxhz opened this issue 1 year ago • 3 comments

What problem does this feature solve?

原生css的支持只有css module 的3个参数;

css loader本身的很多能力不知道是否支持配置?

https://webpack.js.org/loaders/css-loader/#options

What does the proposed API of configuration look like?

支持css 的更多配置

crazyxhz avatar Mar 13 '23 13:03 crazyxhz

除了文档中的参数目前还没有其他支持的计划,不妨可以说说你用到的配置项,我们根据优先级进行支持。

h-a-n-a avatar Mar 13 '23 15:03 h-a-n-a

除了文档中的参数目前还没有其他支持的计划,不妨可以说说你用到的配置项,我们根据优先级进行支持。

url. filter 自定义解析函数,有些css中的url地址不希望解析成模块,希望直接引用地址不解析(历史项目

url('/absoule/path/image.png') => require('./image.png')

crazyxhz avatar Mar 13 '23 15:03 crazyxhz

@h-a-n-a getLocalIdent 参数能否支持

wangtao0101 avatar Mar 16 '23 03:03 wangtao0101

我们这部分和webpack的experiments.css功能进行对齐,如果需要一些定制功能,可以尝试给webpack侧提对应需求,如果觉得目前原生css功能不够,可以先使用css-loader进行workaround

hardfist avatar Jul 12 '23 06:07 hardfist