fix(rsc): add modules property to stats.json #1167
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Close #1110
Summary by CodeRabbit
新功能
mako
crate的file.rs
模块中,为File
结构体添加了一个新的公共方法is_css
,用于检查文件内容是否为CSS。crates/mako/src/features/rsc.rs
文件中,为RscCssModules
结构体添加了一个modules: bool
字段。examples/rsc/src/a.less
文件中,引入了一个CSS规则,将类为.a
的元素样式设置为红色。examples/rsc/src/b.module.less
文件中,引入了一个CSS规则,将类为.a
的元素样式设置为红色。index.tsx
文件中,添加了对a.less
和b.module.less
CSS文件的导入。文档
index.tsx
文件中的导入语句,统一使用单引号替换双引号。