Can a library make sure Webpack removes a branch depending on whether React version is >= 18? #19371
-
Currently we have
Is there any way for the library to be modified so Webpack automatically leaves only the correct branch depending on the React version in the bundle, without the clients needing to modify their Webpack config? Failing that, should we just recommend using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes, it is a valid solution, alternative you can write custom babel/swc plugin and remove set something to |
Beta Was this translation helpful? Give feedback.
Yes, it is a valid solution, alternative you can write custom babel/swc plugin and remove set something to
true
/false