giuseppeg / giuseppeg/styled-jsx-plugin-postcss
Empty styles or selectors cause error
- Dominant language
- JavaScript
- Stars
- 90
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Currently If I write the following test it fails:
```js
it("compiles empty styles", (done) => {
assert.strictEqual(
plugin('p { }', {
compileEnv,
}),
"p { }"
);
});
```
We have, for various reasons, a number of `css.resolve``;` calls in our code which result in the following errors being thrown during compilation.
```
[styled-jsx-plugin-postcss] did not compile the following CSS:
at Array.forEach ()
at Array.forEach ()
at Array.forEach ()
```
I've started digging into this issue a little bit and it looks as if https://github.com/giuseppeg/styled-jsx-plugin-postcss/blob/master/processor.js#L18 never returns so the compilation times out. The only reason I'm thinking it's a bug here is because if I do `postcss().process('p {}', { from: false })` it returns back `p {}` without issue.
I've started debugging this myself, but wanted to document the behavior in an issue in case there's some backstory on this.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.