Webpack 2 - CSS Modules - SASS

How to

This project allows you to use CSS Modules with SASS files.

styles.scss:

.red {
    background-color: red;
}

index.js:

import styles from './styles.scss'

console.log(JSON.stringify(scssStyles));
// { "red" : "styles__red___1nmnb" }

Installation

Install dependencies:

npm run install

Launching

Start the server:

npm start

Go to http://localhost:3000