egoist / egoist/rollup-plugin-postcss
modules configuration is very confusing. Could it be simplified?
- Dominant language
- JavaScript
- Stars
- 689
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
I am using version 3.1.8 and had great trouble getting a css file to avoid getting hashed by the module code.
I have a `transition.css`.
My config was this:
```js
postcss({
extract: true,
modules: true,
use: ['sass'],
}),
```
I had to log this code to work it out even though I read #292 #296
```js
const autoModules = options.autoModules !== false && options.onlyModules !== true; // true
const isAutoModule = autoModules && isModuleFile(_this.id); // false
const supportModules = autoModules ? isAutoModule : options.modules; // finally false
```
I ended up eventually with this
```js
postcss({
extract: true,
modules: false,
autoModules: true,
use: ['sass'],
}),
```
It never occurred to me that modules: false would be the answer or autoModules would not apply to everything.
Should there not just be 1 boolean field and that is it? `{ modules: boolean }`
I don't know the history and apologies if this comes across rude as this is not my intent.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.