Skip to content

All of lodash included with google-map-react #558

Closed
@prakashsanker

Description

@prakashsanker

I just noticed this.

Even though this package uses lodash.omit, it introduces the whole lodash package into the project.

I created a minimal example here so that you can see this https://github.com/prakashsanker/google-map-react-test.

The relevant code sits in the

App.js

, where I do this

import "google-map-react";

When that line is commented out, this is what my webpack bundle analyzer spits out

screen shot 2018-04-11 at 4 52 42 pm

When that line is included it spits out

screen shot 2018-04-11 at 4 53 10 pm

You can see for yourself by pulling down that repo and running

node profile.js

I did a quick search through your code and found that you are including only the omit function like so

import omit from "lodash.omit";

and I would've expected this to prevent what we are seeing.

Could I get some help diagnosing this? I really like this package and I use it for a couple of startups in the developing world, where kilobytes matter, so I'd like to continue using it.

I've used create-react-app for this minimal example, so I'm not sure if that does anything.

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