Currently, to create a new site config is necessary to:
- Create the site config folder for dev and prod under
site-config;
- Update the
package.json scripts, to run and build the new site config;
- Map the site config in the
CONFIGS object, in app/config/config.ts
This process could be improved by using some naming patterns to create folders under site-config (which we already have, E.g. every site config has prod and dev folder and the config.ts file with a default export) and npm script arguments, that way we could get rid of steps #2 and #3 by running the app with: npm run dev --site=hca-dcp
By doing like this we could also remove the env var NEXT_PUBLIC_SITEMAP_DOMAIN which was created for the sitemap, and probably have the current SiteConfig set earlier on the execution time (currently this is only available after rendering the MyApp component)
Currently, to create a new site config is necessary to:
site-config;package.jsonscripts, to run and build the new site config;CONFIGSobject, inapp/config/config.tsThis process could be improved by using some naming patterns to create folders under
site-config(which we already have, E.g. every site config hasprodanddevfolder and theconfig.tsfile with a default export) and npm script arguments, that way we could get rid of steps #2 and #3 by running the app with:npm run dev --site=hca-dcpBy doing like this we could also remove the env var
NEXT_PUBLIC_SITEMAP_DOMAINwhich was created for the sitemap, and probably have the current SiteConfig set earlier on the execution time (currently this is only available after rendering the MyApp component)