Skip to content

moment.js is deprecated and should be replaced #672

@mojoaxel

Description

@mojoaxel

moment.js consideres itself now deprecated.

moment.js takes up over 10% of the bundle size:

-----------------------------
Rollup File Analysis
-----------------------------
bundle size:    1.456 MB
original size:  1.414 MB
code reduction: 0 %
module count:   509

/node_modules/moment/moment.js
█████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 10.48 % (152.665 KB)
/node_modules/vis-util/esnext/esm/vis-util.js
████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 8.92 % (129.931 KB)
/lib/timeline/component/ItemSet.js
███░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 6.79 % (98.892 KB)
/node_modules/vis-data/esnext/esm/vis-data.js
██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 5.82 % (84.813 KB)
/node_modules/@egjs/hammerjs/dist/hammer.esm.js
██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 5.15 % (75.003 KB)
/lib/timeline/Core.js
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.83 % (55.844 KB)
/lib/timeline/component/Group.js
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 3.02 % (43.997 KB)
/lib/timeline/component/LineGraph.js
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.51 % (36.608 KB)
/lib/timeline/Range.js
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.29 % (33.327 KB)
/lib/timeline/Timeline.js
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.11 % (30.676 KB)

The vis.js universe should switch to a different library (e.g. Luxon, Day.js, date-fns, js-Joda)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Hacktoberfesthacktoberfest.digitalocean.comhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions