Closed samajammin closed 1 year ago
We can use an ENV variable to keep track of what languages we want. What we can do is
NODE_ENV === development
&& !!INTL_SUPPORT
, load only English versionsThat way, the format for INTL_SUPPORT would be en,fr,es
and so on.
Any thoughts on this outlook ?
This issue is stale because it has been open 45 days with no activity.
It think much of this work has been done by @pettinarip to let dev specify which languages to build. Going to close this out as done :)
Is your feature request related to a problem? Please describe.
Currently this app takes quite a bit of time to start a local development server via
yarn start
. It'd be a big productivity boost for our team & contributors if we can reduce this boot up time.Describe the solution you'd like
One potential approach we discussed is to have a flag for which/how many languages we support during local development.
Why? We suspect a big time & resource (memory) drain on running the app is the internationalization support. Running the app required building all pages in all languages (~40 total).
Given that the majority of the time we only need to test the English content portion of the application, we could save time & compute resources by removing a bunch of the languages for local development.
Perhaps we could add a flag to the start command where by default, for local development, we only support e.g. 3 languages in the app vs. all of them. Could we inspect that flag (or an ENV variable), then pass in a different array to the intl plugin? https://github.com/ethereum/ethereum-org-website/blob/dev/gatsby-config.js#L28
Describe alternatives you've considered
None but welcome other ideas on how we could speed this up & reduce the memory requirements of running the app!
Want to contribute?
We love contributions from the Ethereum community! Please comment on an issue if you're interested in helping out with a PR.