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

Minimize countries.json #355

Merged
merged 2 commits into from
Apr 24, 2024
Merged

Conversation

Duddino
Copy link
Member

@Duddino Duddino commented Apr 24, 2024

Abstract

country-locale-map contains two giant json, with info that we don't really need.
As a result, it's one of our bigger libraries, which is quite a waste for something we only use once.
image
This PR tells webpack to:

  • Ignore countries-intl.json (Unused by MPW)
  • Keep only the alpha2 and currency field

This cuts down the size of the main bundle from 1.44 MB to 1.27 MB unzipped or 455 KB gzipped to 419 KB gzipped.
image

Testing

Copy link

netlify bot commented Apr 24, 2024

Deploy Preview for cheery-moxie-4f1121 ready!

Name Link
🔨 Latest commit f52f9fb
🔍 Latest deploy log https://app.netlify.com/sites/cheery-moxie-4f1121/deploys/6628f8003d6fba0009dd5af1
😎 Deploy Preview https://deploy-preview-355--cheery-moxie-4f1121.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@panleone panleone added the Enhancement New feature or request label Apr 24, 2024
Copy link
Member

@panleone panleone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK f52f9fb

Copy link
Member

@JSKitty JSKitty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK f52f9fb - Autodetect still working a charm, and bundle size reduced a nice chunk.

Really good catch!

@JSKitty JSKitty merged commit 13a954c into PIVX-Labs:master Apr 24, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants