Skip to content

Do I install the package as a dev dependency? #200

Answered by bengry
TheMikeyRoss asked this question in Q&A
Discussion options

You must be logged in to vote

Hello everyone,

I have size-anxiety and I try to avoid installing any dependency in my UI kit library.

Do I install class-variance-authority as a dev dependency or do I have to install it as a regular dependency?

  1. It wouldn't really matter. At the end of the day, given you use a bundler - if you require/import something and that's used by part of the bundled code, it's gonna get bundled - regardless of where it sits in the package.json.
  2. a regular dependency (dependencies). Since the code is executed at runtime by the consumer. If you use SSR/SSG you could probably prevent this code from running on the client, but it would still run on the server at runtime/build time, respectively.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TheMikeyRoss
Comment options

Answer selected by TheMikeyRoss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants