streamich / nano-css

Distilled CSS-in-JS for gourmet developers
The Unlicense
427 stars 23 forks source link

React and react-dom in peer dependencies #236

Open d1buts opened 4 years ago

d1buts commented 4 years ago

Hi, first of all thank you for so good library.

I'm using nano-css in my project based on Vue.js and every time during install dependencies I get warnings, that react and react-dom are not installed.

Everything works fine, except of that moment.

Can You fix that? Thanks

mindplay-dk commented 4 years ago

Using it with preact myself - this library is also useful without any library and just plain DOM.

Looks like the component add-on and react-preset is where these dependencies come from. (the jsx add-on itself doesn't seem to depend on React.)

Probably the React-specific features should be moved to a sub-package, e.g. css-nano/react, so the react-dependency can be moved out of the main package?

That's a breaking change though.

mindplay-dk commented 4 years ago

Actually, all of the presets probably should be moved to separate sub-packages? Since, currently, you're bundling all of them no matter which one you use, right? Even if you don't use any of them...