lodash / lodash-webpack-plugin

Smaller modular Lodash builds.
Other
1.19k stars 63 forks source link

lodash-webpack-plugin (v.0.11.5) breaks react-google-maps (v9.4.5) #154

Closed aziolek closed 6 years ago

aziolek commented 6 years ago

Bug report

Description

While using lodash-webpack-plugin (v.0.11.5) react-google-maps (v9.4.5) doesn't work properly without emitting any errors to console in dev and prod builds. react-google-maps shows blank grey space.

Steps to reproduce

Clone below repro repo, install dependencies (npm i) and run it locally (http://localhost:8000).

See the difference. Ignore google maps dev mode and load warning, they don't matter.

Expected behavior

react-google-maps works while using lodash-webpack-plugin.

OS and browser information

OS

Browser

working notworking

falsyvalues commented 6 years ago

Hi @aziolek!

Did you try to enable one of the feature sets in lodash-webpack-plugin? There was similar issue #119.

aziolek commented 6 years ago

Hi @falsyvalues. Thank you for your response.

I've just tried using "currying": true, "flattening": true and only "curring": true, as suggested in #119. Still doesn't work.

falsyvalues commented 6 years ago

@aziolek Please try to enable them all. I saw _.get usage in react-google-maps source which require paths option, so check them all and verify.

aziolek commented 6 years ago

@falsyvalues : using collections: true fixes the issue. Thank you for your help.

falsyvalues commented 6 years ago

Rock 😃!

dyf19118 commented 6 years ago

It will affect all third party libraries that take lodash as dependency, not just react-google-maps. It's not possible and not reasonable to know which part of lodash third parties have taken in use.

jdalton commented 6 years ago

@dyf19118 lodash-webpack-plugin is for application bundles. Those applications tend not to re-expose their consumed lodash for third-party use.