lodash/babel-plugin-lodash

How are methods available determined?

egeriis opened this issue · 4 comments

Hey there!

When I installed your lib I was met with a bunch of these:

Module build failed: SyntaxError: The 'lodash' method assign is not a known module.

Odd, I thought. I have now looked for each of the issues mentioning this error, and it is probably due to some legacy in the app I'm working with, that I get these errors.

But could you help me understand how it is determined which methods are available? The code is too abstract for me to quickly get an understanding of the mechanics.

Project is on lodash 2.4.1, which does have the methods causing errors, e.g. assign, isEqual, etc.

Thank you!

It could appear that lodash v2 is not supported?

Hi @egeriis!

babel-plugin-lodash crawls the package and looks for modules of a similar name.
Lodash v4 v2 is not modular so it won't find any.

I suppose you mean Lodash v2?

Yep 😋