Skip to content

Importing react-router-bootstrap includes all of lodash #276

Closed
@matthewjamesadam

Description

@matthewjamesadam

I've recently updated our project's libraries to use the newest react-router-bootstrap, and noticed that our project's bundle size increased a fair bit. It looks like one cause of this is because the newest react-router-bootstrap uses lodash here:

import { isFunction } from 'lodash';

For some reason lodash is not tree-shakable, which means react-router-bootstrap increases our bundle by ~500kb (25kb gzipped). Is there some way that lodash could be used in this library that would allow tree-shaking in the final webpack bundle?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions