Skip to content

NPM package size of moment.js is bothersome #3376

@martinheidegger

Description

@martinheidegger

I checked the file-size of my ./node_modules folder and it seems that moment.js is the heaviest non-C library. 2.1MB is quite a lot. A quick look in the folder size shows:

https://gyazo.com/60cb5b6e69c76767c6d001669ff25a2d

Most of the weight comes from publishing compressed versions of moment.js with npm as well as double-publish all the locales. But the locales alone are quite heavy by themselves.

As such I thought it might be good for moment.js and the community to reduce this amount?!

  • Would it be possible to omit the ./src folder from being published to npm?
  • Would it be possible to omit the ./min folder from being published to npm?
  • Would it be possible to move the ./locales folder into a separate npm package to reduce moment to the minimum?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions