Closed DamianOsipiuk closed 1 year ago
Does this cause warnings for every person installing the library since nobody will have all these peer dependencies? Or does peerDependenciesMeta
fix that?
They are marked as optional
, so users will not get any warnings, unless they will use some super old or non-standard package manager.
For npm
it supported from v7
, yarn
and pnpm
support this from the start i believe.
https://docs.npmjs.com/cli/v9/configuring-npm/package-json#peerdependenciesmeta
Cool, thanks for this
In v2.2.1
This PR should fix https://github.com/pbeshai/use-query-params/issues/256
Despite this repo setup, all packages are published as a single
npm
package. Sub-packages have theirpackage.json
stripped to the simplest form.This setup is causing some bundlers to not be able to pick up
peerDependencies
foradapters
and in turn failing the build.It might also be caused by
pnpm
node_modules
linking strategy.Personally i have encountered the error by using
pnpm
andvite
together.By adding
peerDependencies
to the mainpackage.json
we are ensuring that those dependencies would be properly linked when installing packages.