Production
In a production environment, the VITE_CONFIG_JSON environment variable needs to be defined at build time, otherwise it has no effect; in that case, the node/chain config will be static.
That way the config won't need to be fetched from server—one less network call on page load. That's the recommended setting for controlled hosted environments where you control the node your users will connect to.
You can either:
- Make your CI
exportaVITE_CONFIG_JSONenv variable with the desired settings. - During build time, make sure there is a
.env.productionfile with aVITE_CONFIG_JSONvariable defined in it.