postcss-modules-extract-imports (3.1.0)
Published 2026-02-24 14:03:07 +00:00 by atheaadmin
Installation
registry=npm install postcss-modules-extract-imports@3.1.0"postcss-modules-extract-imports": "3.1.0"About this package
CSS Modules: Extract Imports
Transforms:
:local(.continueButton) {
composes: button from "library/button.css";
color: green;
}
into:
:import("library/button.css") {
button: __tmp_487387465fczSDGHSABb;
}
:local(.continueButton) {
composes: __tmp_487387465fczSDGHSABb;
color: green;
}
Specification
- Only a certain whitelist of properties are inspected. Currently, that whitelist is
['composes']alone. - An extend-import has the following format:
composes: className [... className] from "path/to/file.css", className [... className], className [... className] from global;
Options
failOnWrongOrderboolgenerates exception for unpredictable imports order.
.aa {
composes: b from "./b.css";
composes: c from "./c.css";
}
.bb {
/* "b.css" should be before "c.css" in this case */
composes: c from "./c.css";
composes: b from "./b.css";
}
Building
npm install
npm test
License
ISC
With thanks
- Mark Dalgleish
- Tobias Koppers
- Guy Bedford
Glen Maddern, 2015.
Dependencies
Development Dependencies
| ID | Version |
|---|---|
| coveralls | ^3.1.0 |
| eslint | ^7.10.0 |
| eslint-config-prettier | ^6.12.0 |
| husky | ^4.3.0 |
| jest | ^26.5.2 |
| lint-staged | ^10.4.0 |
| postcss | ^8.1.1 |
| prettier | ^2.1.2 |
Peer Dependencies
| ID | Version |
|---|---|
| postcss | ^8.1.0 |
Keywords
css-modules
postcss
plugin