Closed tomfa closed 8 years ago
hey @tomfa ,
Which npm are you on?
https://github.com/gor181/react-notification-system-redux/blob/master/package.json#L28-L33 are the dependencies.
How did you measure the size?
Cheers
I measured the size by using webpack, and by adding and removing
import Notifications from 'react-notification-system-redux';
from my source files (not using it).
It seems to me it was the usage of lodash that was the cause of almost all of the size increase (1.37 of 1.45 MB). (Tested by replacing the import with import {each, extend} from 'lodash';
npm was on version 3.9.2. Upgrading to 3.10.5 did not help.
E.g. I guess this is not your fault? I'll figure out where I've gone wrong :) Thanks for the library, btw! 👍
Edit: Could replace lodash with ES6 for the next version? (I presume there's not many people using ES5 with Redux)
Yeh we can get rid of lodash, usage of 2 common simple functions is defeating the purpose of having the whole lib as dep.
thanks @tomfa
hey @tomfa
Could be a bit better now. Lodash is only required in dev mode due to examples and the redux being there.
importing react-notification-system-redux into my application increases the size by ~1.45 MB for me, as opposed to only react-notification-system, which adds 60 KB.
Not sure what's up, but it's not good.