1.0.1 • Published 12 months ago

postcss-auto-modules v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

Details

This module is intended to be used in library code that would like to use css modules output by the postcss cli WITHOUT having to think about JSON files and the like.

The goal is to automatically treat *.module.* files as css modules (similar to bundler integrations in vite/webpack/etc). This plugin will also output a .css.js file for every css module which is then imported from your app and re-exports the JSON from postcss-modules and imports the built css file.

Getting Started

Install

npm i -D postcss-auto-modules

Configure PostCSS

{
  "plugins": {
    "postcss-auto-modules": {}
  }
}

Note: all options forwarded to postcss-modules plugin

Use PostCSS CLI

postcss ./src/**/*.css -d dist --base src
1.0.1

12 months ago

1.0.0

12 months ago