Skip to content

react-bootstrap, lodash, and factor-bundle not playing well together #79

@micah-bloomerang

Description

@micah-bloomerang

I've been working on this problem for a couple of days, and I think I finally have it narrowed down. If I'm using factor-bundle where one file contains a reference to lodash and the other file contains a reference to react-bootstrap, I get the following error:

TypeError: Cannot read property '0' of undefined

Here is what is needed to reproduce:

npm install factor-bundle lodash react-bootstrap

index.html

<html>
<body>
<script type="text/javascript" src="bundle/common.js"></script>
<script type="text/javascript" src="bundle/index.js"></script>
</body>
</html>

main/index.js

require('../node_modules/react-bootstrap');

main/bad.js

require('../node_modules/lodash/object/keys');

Build with:

browserify main/index.js main/bad.js -p [ factor-bundle -o bundle/index.js -o bundle/bad.js ] -o bundle/common.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions