Replies: 1 comment 1 reply
-
Do I understand that correctly that you want to use two different |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Is it possible to use the same (node) package in one project but in two different versions.
I'm evaluating to build a little side project for a hackathon using Clojurescript. Now the complicated thing is that I would like to use the current version of React 18 in that project but on the same time I'm required to use an external (not open source) library with React UI Components that only work with React 16.
Is it possible to somehow configure the compiler to use React 16 when building the code from that external UI Component library but React 18 for anything else?
The UI Components should be encapsulated enough by themselves so that it should not be a problem to use them from another Component using a newer version of React. Especially there is no shared state between the components, everything the Components need are simple props.
I guess it could be possible to compile and bundle the Components into an esm bundle that includes the compiled code of React 16 and then import the code (probably as an Extern) in the main project that in turn uses react 18. But maybe there is a more convenient or more efficient way to do this with shadow-cljs?
cheers Mo
Beta Was this translation helpful? Give feedback.
All reactions