Skip to content

Fix lodash usage (in google_map_loader.js + google-map-react itself) #602

Closed
@vertic4l

Description

@vertic4l

@itsmichaeldiego
var _lodash = require('lodash');

if ((0, _lodash.isEmpty)(bootstrapURLKeys.v)) { queryString += '&v=3.31'; }

Due to this implementation webpack bundles the whole lodash library in my bundle.

Could you please get rid of this or fix it to a cherry-picking method approach?
e.g.

var _isEmpty = require('lodash/isEmpty');

bildschirmfoto 2018-06-20 um 15 53 38

before, after commenting this out:

bildschirmfoto 2018-06-20 um 16 34 25

It's gone... lodash.min.js will be another package...

Edit:

It's the dist package of google-map-react... which gets imported by webpack.
lodash.min.js was bundled there inside...

import GoogleMapReact from "google-map-react";

imports lodash.js through google_map_loader.js and lodash.min.js through dist-package of google-map-react.

Please fix this huge dependency... :)

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