egoist / egoist/rollup-plugin-postcss

Unable to use modules with postcss-for or postcss-each

Open
#366 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
689
Forks
210
PR merge metrics
No merged PRs in 30d

Description

### Problem
Because postcss-modules runs first — we get wrong classNames in css and js files when use other postcss-plugins. For example postcss-for or postcss-each.

This behavior appeared after #249

```postcss
@for $i from 1 to 2 {
.row-$(i) {
width: $(i)px;
}
}
```

### Current

```postcss
/* hash: 1etip */

.row-_1etip1 {
width: 1px;
}
.row-_1etip2 {
width: 2px;
}
```

```js
{"row-":"row-_1etip"};
```

### Expected

```postcss
/* hash: 1etip */

.row-1_1etip {
width: 1px;
}
.row-2_1etip {
width: 2px;
}
```

```js
{"row-1":"row-1_1etip","row-2":"row-2_1etip"}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.