Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract admin moment.js locales to separate files, load them lazily #1221

Merged
merged 1 commit into from
May 3, 2019

Conversation

rafalp
Copy link
Owner

@rafalp rafalp commented May 3, 2019

This PR redoes moment.js setup for admin JS to load moment.js locale files lazily, reducing the JS download size from 554kb to 340kb (before gzip).

It also redoes misago.core.momentjs utils to be generic, enabling admin and forum to share same logic for moment.js locales resolution.

Fixes #1212

@rafalp rafalp added area: frontend This issue involves JavaScript, React.js and Node area: backend This issue involves Python, Django or dependency (eg. database) enhancement Improvement to existing feature or dev experience area: tooling This issue involves Docker or Bash script labels May 3, 2019
@rafalp rafalp added this to the 0.20.0 milestone May 3, 2019
@rafalp rafalp self-assigned this May 3, 2019
@rafalp rafalp mentioned this pull request May 3, 2019
@rafalp rafalp merged commit f0436e1 into master May 3, 2019
@rafalp rafalp deleted the admin-momentjs-translations branch May 3, 2019 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: backend This issue involves Python, Django or dependency (eg. database) area: frontend This issue involves JavaScript, React.js and Node area: tooling This issue involves Docker or Bash script enhancement Improvement to existing feature or dev experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lazy-load moment.js language files in the admin
1 participant