Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bram Doppen 3 posts 83 karma points
    Nov 25, 2021 @ 14:40
    Bram Doppen
    0

    Replace moment.js in Forms with a modern, smaller library

    Today, when running a pagespeed test on a website that uses Umbraco Forms, pagespeed insights reported some warnings about the large filesize of moment-with-locales.min.js which is used by Umbraco Forms.

    Total filesize of the minified version (moment-with-locales) is 322kb. I inspected the JavaScript really quickly and I saw the usage of moment just a few times. The filesize seems pretty huge to me to include in a plugin.

    Suggestion: Replace moment.js with some other and modern library like dayjs which uses the same syntax, is modular/tree-shakeable, and only 2kb in size.

    Happy to hear your thoughts about it!

  • Jeffrey Schoemaker 408 posts 2138 karma points MVP 8x c-trib
    Nov 26, 2021 @ 07:09
    Jeffrey Schoemaker
    100

    Hi Bram,

    welcome to the Our-forum and congratulations on your first post :)!

    🎉🎉🎉🎉🎉

    This is a great suggestion and I'm really keen on some feedback from the team that is working on Umbraco Forms. The best way to suggest this is the Github-tracker for Umbraco Forms: https://github.com/umbraco/Umbraco.Forms.Issues/issues. This is the perfect place to report bugs, request features or give great input like this!

    Hopefully you take some time to report it over there as well!

    Kindest regards,

    one of your favourite colleagues!

    Jeffrey

    enter image description here

  • iNETZO 134 posts 497 karma points c-trib
    Nov 26, 2021 @ 09:14
    iNETZO
    0

    Hi Bram,

    Like Jeffrey said: great suggestion! Please fill out the form quickly, then maybe it might be included in the upcoming version of Forms.

    Best regards,

    iNETZO

  • Bram Doppen 3 posts 83 karma points
    Nov 26, 2021 @ 14:08
    Bram Doppen
    0

    Thanks Jeffrey and iNETZO.

    I posted this issue on the Github issue tracker.

    This thread can be considered as closed.

Please Sign in or register to post replies

Write your reply to:

Draft