Auto CSS Modules Webpack Plugin

JSON →
library 1.1.1 ·javascript
verified May 27, 2026

Automatically detects import or require statements for CSS files and adds a query parameter to mark them as CSS Modules in webpack. Current stable version is 1.1.1, with npm package last updated in March 2023. The plugin works by analyzing the AST during webpack's parse phase, converting statements like `import styles from './index.css'` to `import styles from './index.css?modules'`. Supports default extensions: .css, .less, .sass, .scss, .stylus, .styl. Designed for webpack 4 (>=4.46.0) and 5 (>=5.20.0). Key differentiator: avoids manual configuration of CSS Modules per file by automating the detection based on variable assignment.

total hits 19
actors 6 distinct systems
last hit 1d ago AhrefsBot
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
Humans
1

top countries 🇩🇪 Germany · 🇺🇸 United States · 🇨🇦 Canada · 🇸🇬 Singapore · 🇬🇧 United Kingdom