egoist / egoist/rollup-plugin-postcss

multiple @import statements not at top of file

Open
#89 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
689
Forks
210
PR merge metrics
No merged PRs in 30d

Description

if I have two css files:

```
/* foo.css */
@import url('some-package');

.foo {
color: red;
}
```

and

```
/* bar.css */
@import url('another-package');
.bar {
color: blue;
}
```

rolling up a main file like this:

```
import './foo.css';
import './bar.css';
```

generates the following css:

```
/* foo.css */
@import url('some-package');

.foo {
color: red;
}

/* bar.css */
@import url('another-package');
.bar {
color: blue;
}
```

However, this is invalid css, as all of the import statements should be at the top...

Is there a way to work through this?

I can just process the output as SCSS _after_ it builds, but this seems like it should be something handled by this plugin

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.