Skip to content

UI page load requests hundreds of date-fns-locale packages unnecessarily #8051

@andre8244

Description

@andre8244

Steps to reproduce

  1. Open the login page of cluster admin in a web browser
  2. Inspect the Network tab in browser DevTools
  3. Observe page load requests

Expected behavior

The page should load only the necessary date-fns locale packages for the current/configured language, or none date-fns locale package at all.

Actual behavior

The application requests many hundreds of date-fns-locale-* packages on page load, one for each language supported by date-fns. This causes:

  • Unnecessary network overhead during page load
  • Slower initial page render
  • Wasted bandwidth

Root cause

The i18n configuration was dynamically importing all date-fns locale modules regardless of which language is actually needed.

Screeshot of date-fns locale packages downloaded

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    verifiedAll test cases were verified successfully

    Type

    No fields configured for Bug.

    Projects

    Status
    Verified

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions