lodash / babel-plugin-lodash

Modular Lodash builds without the hassle.
Other
1.96k stars 92 forks source link

Babel 7 compatibility (Fixes #193) #194

Closed jscinoz closed 6 years ago

jscinoz commented 6 years ago

Fixes #193

Fixes compatibility with Babel 7, by using babel-helper-module-import's addDefault (instead of file.addImport, which is deprecated in Babel 7), and traversing the AST ourselves to find module imports, as Babel no longer does this for us.

Tests pass, and compatibility appears to be maintained with Babel 6.26.0, but I have not tested this extensively.

jsf-clabot commented 6 years ago

CLA assistant check
All committers have signed the CLA.

jdalton commented 6 years ago

Wow, thank you @jscinoz!

tomchentw commented 6 years ago

That was quick! Any chances we can get an npm release with a beta tag?

jdalton commented 6 years ago

@tomchentw It will most likely happen over the weekend soonish.

spencerbeggs commented 6 years ago

@jdalton Any chance you can cut a release for this? Tested locally it resolved the issue.

jdalton commented 6 years ago

v3.3.0 has been published :tada:

abhinavsingi commented 6 years ago

which broke like this Error: Cannot find module 'babel-helper-module-imports'