Reputation: 2285
I use the Razzle which has a pretty good support for the CSS modules. It uses just the Webpack with common CSS Loader, so it is configurable the same way. My trouble is that I'm not able to use SCSS files the same way.
Works:
import styles from "./App.module.css";
... <div className={styles.foo}>
Doesn't work
import sasses from "./App.module.scss";
... <div className={sasses.foo}>
My configuration:
module.exports = {
plugins: [
{
name: "scss",
options: {
css: {
modules: true
}
}
},
How to configure the Razzle to use the SCSS modules?
Upvotes: 2
Views: 381