react-binding icon indicating copy to clipboard operation
react-binding copied to clipboard

Compatibility with browserify-shim

Open xpopov opened this issue 8 years ago • 1 comments

Hello!

I seem to having problem using react-binding with browserify-shim. I use gulp to bundle my app, and use this config:

"browserify-shim": { "jquery": "global:$", "react": "global:React", "react-dom": "global:ReactDOM", "react-bootstrap": "global:ReactBootstrap", "react-router": "global:ReactRouter", "react-binding": "global:ReactBinding", "react-input-color": "global:ReactInputColor" }

I include react-binding.js in index.html.

After all js is loaded in document, React app cannot find react-binding. It tries to do this in this code:

var _reactBinding = (typeof window !== "undefined" ? window['ReactBinding2'] : typeof global !== "undefined" ? global['ReactBinding2'] : null);

var _reactBinding2 = _interopRequireDefault(_reactBinding);

Do you know what is wrong and how to fix this?

xpopov avatar May 08 '16 17:05 xpopov

sorry, for big delay -> i upgraded browserify to generate react-binding -> try version 0.8.0

rsamec avatar Jan 01 '17 16:01 rsamec