I recently installed a vscode extension that shows me how large certain imports are, and I was really shocked at just how big moment.js is. The issue is I really love and want to keep using react-dates, which is the only thing I'm really using moment for.

I know it's an open issue for moment to modularize, but in the mean time it would be cool if moment were optional, so you could pass a vanilla js Date object in instead of a moment object
Alternatively, would you recommend I fork and add this functionality myself? Or is it so deeply rooted that you think I'd run into a bunch of unforeseen stuff?
Thank you, and thank you for all the open source work airbnb does!! 馃槉馃尭
Typically what one does in their bundler is only include the locale for the given request, which means that your IDE plugin is over-reporting the actual size.
Moment usage is definitely so deeply rooted that it's likely not worth the effort.
how about using this https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat (ECMA-402) instead of moment, this can be polyfilled if needed, on newer browsers you have all the goodies, so you dont have to #usetheplatform :)
How large is the polyfill compared to moment? I suspect you'll find it's much much larger, because it contains all the ICU data.
Most helpful comment
Typically what one does in their bundler is only include the locale for the given request, which means that your IDE plugin is over-reporting the actual size.
Moment usage is definitely so deeply rooted that it's likely not worth the effort.