lodash / babel-plugin-lodash

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

_createPartial is mistook as _createWrap #177

Closed zation closed 7 years ago

zation commented 7 years ago

Please check this repo: https://github.com/zation/react-isomorphic-starter. Before I include babel-plugin-lodash and lodash-webpack-plugin, it works fine. After I include them, I get below error:

screen shot 2017-06-26 at 2 53 24 am

You can reproduce it by command npm start.

I found _createPartial.js is bundled as _createWrap.js. Do I mistake anything?

jdalton commented 7 years ago

Hi @zation!

The lodash-webpack-plugin many disables feature sets by default so you have to opt-in to ones you want. Look at the currying or metadata feature set.

zation commented 7 years ago

Thanks! Fix it with currying option:

    new LodashModuleReplacementPlugin({
      currying: true,
      paths: true,
    }),