I was trying to use babel-plugin-lodash with date-fns, however the plugin breaks badly because date-fnspackage.json does not have a main attribute.
Looking a the code, it already handles the case where package.json is missing. So, I'd like to propose to extend the check to the main attribute too, defaulting to index.js if missing so the plugin could be more resilient.
I was trying to use
babel-plugin-lodash
with date-fns, however the plugin breaks badly becausedate-fns
package.json
does not have amain
attribute.Looking a the code, it already handles the case where
package.json
is missing. So, I'd like to propose to extend the check to themain
attribute too, defaulting toindex.js
if missing so the plugin could be more resilient.