-
I am a bit confused as to why tsdown bundles I am comparing the npm docs to tsdowns docs: npm docshttps://docs.npmjs.com/specifying-dependencies-and-devdependencies-in-a-package-json-file
https://docs.npmjs.com/cli/v11/configuring-npm/package-json#peerdependencies
tsdown docsThe docs for ts down regarding the dependencies:
ExpectationTherefor, I would conclude that we use dependencies if we want the packages to be bundled for production, And we would use peerDependencies if we want the project that consumes this library to have a package installed with a spesific version. I would then expect tsdown to bundle dependencies if they are actually imported or required by your source code. Does that make sense? Feel free to link additional resources that I might be missing. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Beta Was this translation helpful? Give feedback.
It seems that a package manager (such as npm, pnpm, or yarn) was not used to install your package; instead, GitHub simply fetched your dist code directly from the repository. In this case, you should move all
dependencies
todevDependencies
, asdependencies
are meant for use with package managers (as stated on npmjs.org) and have no effect in your current setup.