Steps to reproduce
- Open the login page of cluster admin in a web browser
- Inspect the Network tab in browser DevTools
- 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

Steps to reproduce
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:
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