monokrome / webpack-react-starter

Minimal starter for using React + PostCSS with Webpack.
17 stars 0 forks source link

Postcss #1

Closed rodrigonehring closed 7 years ago

rodrigonehring commented 7 years ago

Do you need postcss if are using styled-components? Its a lot of dependencies with can be removed...

monokrome commented 7 years ago

Hi, @rodrigonehring! Thanks for posting this issue! :)

I think that styled-components uses postcss, so this allows us to do proper vendor prefixing and support newer CSS features w/ older browser support.

It's possible that I misunderstand! What do you think?

mxstbr commented 7 years ago

styled-components doesn't use PostCSS anymore since v2. (only on ReactNative) We wrote our own super tiny and fast parser called stylis!

On top of that, you can kick that out of your bundle with the Babel plugin by enabling the (experimental for now) option preprocess: true, which parses your CSS at build time. :muscle:

monokrome commented 7 years ago

Awesome! Thanks to both of you for clarifying this! I've pushed a commit that removes all the CSS excess :)

monokrome commented 7 years ago

Also, of course, I hope you feel free to reopen the issue (or send a pull request) if this isn't fixed :) :) :)