Replies: 1 comment
-
No updates on this ? |
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
-
Doing a big re-architecture of a monolith frontend. We are too big to safely upgrade React and other fundamental libraries across the whole app. It causes too many issues. Better to upgrade page by page. That means several versions of React need to co-exist in one app.
I managed to achieve this by breaking down the monolith onto multiple npm packages. There is a shell package, which references individual page packages. Shell also has the central storybook instance, which imports all the stories from the other packages.
This all works correctly in webpack. It loads the right version depending on where the code lives. But storybook (
@storybook/react
,webpack5
) seem to hard-wire react to always be from the root node_modules. I can see it adds webpack resolve aliases for react and react-dom. This means that anything expecting react 18 gets react 17.So far I haven't found any way to resolve this. Has anyone done anything similar? Is it possible at all?
Beta Was this translation helpful? Give feedback.
All reactions