You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currently the npm package declares a peerDependency to preact at the root level (/package.json) and no peerDependency at react or preact level (/[p]react/package.json).
Is it on purpose (e.g. that some bundlers/tools do not support peerDeps on sub packages) or should it be fixed ?
Cheers !
The text was updated successfully, but these errors were encountered:
Hi @gluck - the issue is more that npm itself doesn't support peerDependencies in sub-packages. The fact that we have a peerDep for preact at the root is mostly due to htm previously only shipping a Preact variant. As far as I'm aware, the only solution here to avoid everyone getting warnings in their console when installing is simply to remove the peerDependencies altogether.
Hi ! Thanks for the fix at root level.
Right now npm mostly ignores sub-packages entirely, no ? (only the bundler, or node, or whoever resolves the import statement cares)
I'd add the peerDep on sub-package, because that's how it'd be if the package was shipped on its own (e.g. lerna ?), but I don't think anyone really cares today.
Hi,
currently the npm package declares a peerDependency to preact at the root level (
/package.json
) and no peerDependency at react or preact level (/[p]react/package.json
).Is it on purpose (e.g. that some bundlers/tools do not support peerDeps on sub packages) or should it be fixed ?
Cheers !
The text was updated successfully, but these errors were encountered: