Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PostCSS-Auto-Modules

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

About

PostCSS modules wrapper that automatically outputs js files for library code.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages