You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! It seems like the fp variety of lodash isn't supported in the lodash-es package. Is this intentional?
I'm using CRA and would like to reduce my bundle size through tree shaking. I've read through this thread facebook/create-react-app#1069 and it seems like the CRA's lodash babel plugin implementation is waiting for lodash v5. Is there still a way to benefit from tree shaking using lodash/fp and something like lodash-es?
The text was updated successfully, but these errors were encountered:
Tree-shaking is a bit of a lie. Tooling tends to be overly sensitive to potential side-effects, of which Lodash has none. I recommend using babel-plugin-lodash(it works for lodash/fp too) and if you're feeling adventurous combo it with lodash-webpack-plugin with the "currying" feature set enabled.
Update:
Webpack 4 will support the sideEffects field which will allow for better tree-shaking support.
Hi! It seems like the fp variety of lodash isn't supported in the
lodash-es
package. Is this intentional?I'm using CRA and would like to reduce my bundle size through tree shaking. I've read through this thread facebook/create-react-app#1069 and it seems like the CRA's lodash babel plugin implementation is waiting for lodash v5. Is there still a way to benefit from tree shaking using
lodash/fp
and something likelodash-es
?The text was updated successfully, but these errors were encountered: