Skip to content

Compatibility with browserify-shim #5

@xpopov

Description

@xpopov

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions