Skip to content

webpack and its plugins should be peer dependencies of @storybook/builder-webpack5 #26825

Answered by valentinpalkovic
mxdvl asked this question in General
Discussion options

You must be logged in to vote

Hi @mxdvl

Thank you very much for raising this issue.

In a less complex world, I would definitely agree with you. Today, though, the frontend development landscape is pretty fragmented, and this also applies to the number of package managers and their different behaviors.

Declaring all webpack-related dependencies as peer dependencies only works if users have already installed webpack. In more restricted modes, like yarn pnp, they have to be even direct dependencies of the user instead of transitive ones, which meta frameworks like Next.js may bring.

If the user still needs to install them as a direct dependency, the package managers decide whether they are automatically installed. Some d…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by vanessayuenn
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #26736 on April 12, 2024 09:34.