/css-modules-demo

CSS Modules Demo for DresdenJS

Primary LanguageJavaScript

CSS Modules Demo

This is a simple CSS Modules demo with a very minimal webpack config.

Installation

  1. Make sure you have node.js installed
  2. Clone this repo
  3. run npm install
  4. either run npm run start to run in development mode with live-reload and hot-module-replacement
  5. or run npm run build to build the project

Branches

Have a look at the branches to see the demo code of my presentation.

  • no-modules-base - "pre-launch" without modules
  • no-modules-fuckup - typical fuckups that happen without a CSS architecture in place
  • webpack-modules - how to have CSS next to components, no CSS Modules yet
  • css-modules-base - CSS Modules enabled, configured for readable class names
  • css-modules-cssnext - CSS Modules and postcss enabled, configured for mangled class names

Have fun!