GitXplorerGitXplorer
r

ghiscoding-_-moment-tiny

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
928bddc7a5acc1dbc8bd0db4a887c24bf12aeda0

Merge branch 'main' of https://github.com/ghiscoding/moment-tiny

gghiscoding committed 9 months ago
Unverified
01863c872aaa83620af3ddd07ccf315db3d8118f

fix: update pkg exports & publish new release

gghiscoding committed 9 months ago
Verified
ff8d6fc3fa19457d03e607c0d0241dfee0522f7b

docs: use tags link since moment doesn't use releases

gghiscoding committed 9 months ago
Unverified
003ac536b7fb9df6c79bfec85061866770f20412

docs: add better project info in readme

gghiscoding committed 9 months ago
Unverified
10ac1169fc51bc896d2a327da8e343c20f6a8246

initial commit & sync with moment v2.30.1

gghiscoding committed 9 months ago

README

The README file for this repository.

License: MIT npm version

moment-tiny

This package exposes 2 builds from the MomentJS projects (CJS and ESM), both of the files are pulled from the GitHub/Moment project, so that you can import/require your prefered build of moment into your projects without the bloat of any locales.

  • CJS which is /moment.js (not minified) located at GitHub Moment's project root.
  • ESM which is /min/moment.min.js (minified) located in GitHub Moment's project under /min folder
    • some info was detailed in this MomentJS commit.

This package will follow the moment.js releases.

What's the difference with moment-mini?

The difference is that moment-mini is only including the CJS build, however I'm more interested in the ESM build which is also included in here. I also added exports in the package.json for better support as can be seen under the Are the types wrong website.

To be clear, MomentJS already has both CJS/ESM builds (which is actually where we are getting the files from) but bundlers like WebPack will most often include all locales which is a huge problem. Since moment-tiny does not provide any locale, the install will always be the smallest without requiring any bundler config.