The site I'm building currently has three different regional versions (Australia, Germany, rest-of-world). These will be deployed to seperate urls.
It's a static site, hosted on s3 using react. The three versions share 99% of the code and use the same assests (images, video) but have different text and possibly an extra page.
How do I manage this? I want 99% of the changes I make to be shared by all of the regions.
Here are the thoughts I had:
- Determine locale at runtime, letting the React components handle the differences
- pros: conceptually simple, only build once
- cons: everyone gets everything
- Determine locale at build time by setting environmental variables
- pros: users only download what is needed
- cons: complexity
- Three different repos, two of which freqeuently
fetchfrom a "master" repo
- pros: ??
- cons: guaranteed to forget to sync at some point
I'm leaning towards option 1. The issue of sending the user way too much data could be solved by using code splitting.