0
votes

I am developing a site for a customer. It is composed by React components and I am bundling libs such as react and react-dom in a standalone an external bundle, using browserify. The problem is that an external a 3rd party widget provider ships widgets with a script bundle, containing a different React version, also built with browserify.

Is there a way to avoid a collision without having the client remove React from his bundle script?

1
can the 3rd party not ship with react? - Daniel A. White
Can you post your code? - Ashish Ahuja
@DanielA.White The 3rd party has indicated that upgrading to react 0.14.7 is something that will take them a while, also I would like to keep it separate so that we can upgrade our React at a later stage, not having to take into account 3rd party providers. - jlundela

1 Answers

0
votes

It shouldn't be a problem to build bundle with react not poluting global scope. There is even option for this in browserify: --standalone.