Skip to content

Latest commit

 

History

History
 
 

react-static-plugin-css-modules

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

react-static-plugin-css-modules

A React-Static plugin that adds loader and SSR support for css modules

Installation

In an existing react-static site run:

$ yarn add react-static-plugin-css-modules

Then add the plugin to your static.config.js:

export default {
  plugins: ["react-static-plugin-css-modules"]
};

With Options

export default {
  plugins: [
    [
      "react-static-plugin-css-modules",
      {
         modules: true, // set true by default
         localIdentName: '[path][name]__[local]--[hash:base64:5]', // just an example
         // any other options you wish from css-loader
         // want to use sass? you can track it down in your webpack build and add the loader
         // otherwise open an issue tagging @ScriptedAlchemy. He will enhance the options if required 
       }
    ]
  ]
};