react-static-plugin-css-modules

7.6.2 • Public • Published

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 
       }
    ]
  ]
};

Readme

Keywords

none

Package Sidebar

Install

npm i react-static-plugin-css-modules

Weekly Downloads

2

Version

7.6.2

License

MIT

Unpacked Size

6.49 kB

Total Files

6

Last publish

Collaborators

  • tannerlinsley
  • sleeplessbyte