styled-components / styled-components-website

The styled-components website and documentation
https://styled-components.com
MIT License
612 stars 436 forks source link

Default installation as a dev dependency #932

Closed luciomartinez closed 1 year ago

luciomartinez commented 1 year ago

The reason behind it is to make the default what's likely the most used way to install the library. It'll help reducing the overhead for library creators of manually doing it afterwards.

luciomartinez commented 1 year ago

@probablyup what do you think?

quantizor commented 1 year ago

I don't think so, it should go in dependencies if it's used in production.

luciomartinez commented 1 year ago

I don't think so, it should go in dependencies if it's used in production.

You're right in the sense that whatever is used in production should be part of dependencies. But in the case of styled-components, it's a library used at build time to generate the assets (HTML/CSS/JS) that will then go into production. Hence, the library itself won't be used in production. Unless I'm missing something 🤔

quantizor commented 1 year ago

I don't think so, it should go in dependencies if it's used in production.

You're right in the sense that whatever is used in production should be part of dependencies. But in the case of styled-components, it's a library used at build time to generate the assets (HTML/CSS/JS) that will then go into production. Hence, the library itself won't be used in production. Unless I'm missing something 🤔

You are, s-c has a runtime that is included in the bundle if React rehydration takes place (99.9% of the time this is the case.)