Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does the readme install this as a dev dependency? #30

Open
douglasg14b opened this issue Jun 9, 2024 · 1 comment
Open

Why does the readme install this as a dev dependency? #30

douglasg14b opened this issue Jun 9, 2024 · 1 comment

Comments

@douglasg14b
Copy link

This means it won't be built into production bundles.

@douglasg14b douglasg14b changed the title WHy does the readme install this as a dev dependency? Why does the readme install this as a dev dependency? Jun 9, 2024
@softbeehive
Copy link
Contributor

Hi Douglas, dev dependency in readme is due to my muscle memory. Bundlers like Rollup, Webpack, and Parcel don't differentiate between dependencies and devDependencies. As long as you import the package in the source code somewhere in the tree of your entry file, it ends up in the production bundle. I tested it with Vite.

When you run npm install --production, npm installs only the dependencies. In that case, move it to dependencies.

I'll consider updating the readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants