postcss / postcss-js

PostCSS for React Inline Styles, Free Style and other CSS-in-JS
MIT License
657 stars 25 forks source link

How to pass `from`option? #41

Closed karolis-sh closed 5 years ago

karolis-sh commented 5 years ago

Hello, I'm getting warnings - Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.

It seems that you can't pass the from option, or it should bet set to undefined in the first place since this is supposed to be used only in the browser .

ai commented 5 years ago

How do you use PostCSS?

postcss-js shouldn’t show this warning since it doesn’t use postcss.parse()

karolis-sh commented 5 years ago

It seems that only the async method warns about it:

import postcssJs from "postcss-js";

postcssJs.async([])({ padding: "10px" });

Here's the demo - https://codesandbox.io/s/dreamy-jennings-xqe7t

ai commented 5 years ago

Got it. Fixed 197c5f3

ai commented 5 years ago

Released in 2.0.3