Skip to content

Commit 84b4c0f

Browse files
author
shikuan.sk
committed
fix: mako已经支持了scss 但是没有支持module.scss文件
1 parent b754992 commit 84b4c0f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

crates/mako/src/visitors/virtual_css_modules.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ pub struct VirtualCSSModules {
1010
}
1111

1212
fn is_css_modules_path(path: &str) -> bool {
13-
path.ends_with(".module.css") || path.ends_with(".module.less")
13+
path.ends_with(".module.css")
14+
|| path.ends_with(".module.less")
15+
|| path.ends_with(".module.scss")
1416
}
1517

1618
pub fn is_css_path(path: &str) -> bool {

examples/rsc/src/c.module.scss

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.c { color: blue; }
2+

examples/rsc/src/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22
import Foo from './Foo';
33
import './a.less';
44
import './b.module.less';
5+
import './c.module.scss';
56

67
export default function App() {
78
return (

0 commit comments

Comments
 (0)