Skip to content

Cannot bundle 'reactstrap' by 'browserify' because of 'reactstrap-tether' #466

@fantasydr

Description

@fantasydr

Thanks for providing this awesome package which made my development much easier.

I got an issue related to 'reactstrap-tether'. I've also added a comment in shipshapecode/tether#175

It is caused by the tether.js forked in 'reactstrap-tether'.
Basically this tether.js will block browserify from bundling 'reactstrap', there will be an error:

Error: Cannot find module './utils' from .....

The workaround is ignore 'reactstrap-tether' from the bundling.

bundle.ignore('reactstrap-tether');
//or command line
browserify -i reactstrap-tether ....

But the result will not have ToolTip or other components which used 'tether'.
It seems the webpack or 'create-react-app' could work with current 'reactstrap' setup without any issue.
I think it would be nice to let 'browserify' finish its job properly.

BTW, directly include './node_modules/reactstrap-tether/src/js/tether' won't work.
The 'import' and 'export' keyword will cause trouble. User must provide preset such as es2015.
Is it better to avoid using 'import/export' and keep the minimal dependency?

#438

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions