Skip to content

[BUG] Website is malfunctioning since the repo and npm size are too large to be served via JSDelivr #846

@Thomas-Boi

Description

@Thomas-Boi

Bug description

Our repo package is getting too large to be served via JSDelivr.

Here are the stats of our package:
image

The strange thing is this doesn't happen to our previous versions, which were also around the same size:
image

This is affecting the website's functionality:
image

The website can't pull individual files from the repo due to the size.

The biggest offender is the /icons folder. Its size is 116 MB, which is 89% of the package size right now.

Next is node_modules at 27.8 MB. However, our dependencies are all listed as devDependencies, which should not affect the install nor publish size.

The remaining size is split between the /fonts at 2.8 MB, /.github at 3.2 MB, and /icomoon.json at 1.8 MB. These are negligible.

Possible fixes or solutions

Here are a few solutions:

  1. We can switch the URL to use the GitHub repo instead. This is not considered good practice but it might do for a quick fix.
  2. Move the icons into a separate repo
  • I like this idea the most. The icons are quite huge and doesn't need to be in the same location as the fonts.
  • The only issue is how do separate these two. Perhaps make a new repo for the fonts only? Whenever there's a new release, a PR is opened into it that contains the new font files and css files only?
  1. Ignore them somehow when pushing to npm.
  • Perhaps when we publish to npm, we can delete the /icons folder? This means that all URL to the .svg files will be done through GitHub from now on.
  • If npm has something similar to .gitignore, we can use that too.
  1. Change the size limit of JSDelivr.
  • Currently, it's set at 50 MB. Perhaps we can increase it? This might eventually reach a ceiling so I think this is a short term solution.

Additional information

We should try and fix this ASAP. Probably make a minor release for it too since I merged kaggle yesterday.

EDIT: See this comment for the error message found when loading an icon.
Here's the image:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUse this label for pointing out bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions