diff --git a/crates/mako/src/visitors/virtual_css_modules.rs b/crates/mako/src/visitors/virtual_css_modules.rs index e1ba64e74..758eeefe4 100644 --- a/crates/mako/src/visitors/virtual_css_modules.rs +++ b/crates/mako/src/visitors/virtual_css_modules.rs @@ -10,7 +10,9 @@ pub struct VirtualCSSModules { } fn is_css_modules_path(path: &str) -> bool { - path.ends_with(".module.css") || path.ends_with(".module.less") + path.ends_with(".module.css") + || path.ends_with(".module.less") + || path.ends_with(".module.scss") } pub fn is_css_path(path: &str) -> bool { diff --git a/examples/rsc/src/c.module.scss b/examples/rsc/src/c.module.scss new file mode 100644 index 000000000..1d8cda3ba --- /dev/null +++ b/examples/rsc/src/c.module.scss @@ -0,0 +1,2 @@ +.c { color: blue; } + diff --git a/examples/rsc/src/index.tsx b/examples/rsc/src/index.tsx index ab1675876..30d7ca790 100644 --- a/examples/rsc/src/index.tsx +++ b/examples/rsc/src/index.tsx @@ -2,6 +2,7 @@ import React from 'react'; import Foo from './Foo'; import './a.less'; import './b.module.less'; +import './c.module.scss'; export default function App() { return (