-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty styles or selectors cause error #50
Comments
@KB1RMA thanks for reporting this issue. Does this happen with the latest version of styled-jsx-plugin-postcss ? If so which version of Node? Can you check that the error occurs regardless of the value of |
By the way in your example test your function has |
Whoops - bad copypasta job on my end putting a quick example together - pretend I didn't have that argument in there, sorry! :) edit: here's what I was doing additional testing with: it.only("works with empty styles", (done) => {
postcss()
.process('p {}', { from: false })
.then((result) => {
console.log(result);
done();
})
});
This happens on current Node version: I discovered this while upgrading from the latest |
I think I've tracked this down to Not sure if it's technically a bug in the plugin? Or how postcss handles minified css resulting in empty strings because this doesn't fully explain why it's failing in my current project as I don't use |
Currently If I write the following test it fails:
We have, for various reasons, a number of
css.resolve``;
calls in our code which result in the following errors being thrown during compilation.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 backp {}
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.
The text was updated successfully, but these errors were encountered: