pnpm folder structure results in package loading wrong peerDependency #3437
Unanswered
rdsedmundo
asked this question in
Q&A
Replies: 1 comment
-
Yeh, same as #3441 as you noted. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Relevant issue for context.
I have this monorepo setup:
<workspaceRoot>/package.json
<workspaceRoot>/packages/react-app
react-refresh-webpack-plugin
code uses Node native module algorithm, i.erequire('webpack')
, and because everything is hoisted to the virtual store directory, it's choosing the workspaceRoot's webpack version (5) instead of the (4), even though storybook itself executed the plugin with webpack (4). This doesn't happen with Yarn/npm because the folder structure is preserved, i.e the Node algorithm first sees webpack (4) coming from Storybook traversing the tree.Is this an issue or expected behavior of pnpm? Is there any better solution other than forcing the resolution with the hook as I did in the comment I linked above?
Beta Was this translation helpful? Give feedback.
All reactions