Merges the config found in publicRuntimeConfig.firebase with the module options, I don't think this works if you add the module to buildModules.
Adds functionality to compile/generate templates on startup, maybe there is a better way that doesn't require adding lodash and serialize-javascript as dependencies. The compilation also makes the assumption that the nuxt template global is always set to $nuxt, this can probably be cached/saved at build time for accuracy.
To me this seems a bit easier or more flexible than the customEnv key and the nested environment configs. I suggest removing that approach if this feature gets added as the same can be achieved with runtime config and it could cause confusion/conflicts if nested configs are used in combination with runtime config.
My implementation feels a bit hacky to me, so please let me know if there are any changes to be made! 😄
Merges the config found in
publicRuntimeConfig.firebase
with the module options, I don't think this works if you add the module tobuildModules
.Adds functionality to compile/generate templates on startup, maybe there is a better way that doesn't require adding
lodash
andserialize-javascript
as dependencies. The compilation also makes the assumption that thenuxt
template global is always set to$nuxt
, this can probably be cached/saved at build time for accuracy.For dynamic configs the usage could be as follows
To me this seems a bit easier or more flexible than the
customEnv
key and the nested environment configs. I suggest removing that approach if this feature gets added as the same can be achieved with runtime config and it could cause confusion/conflicts if nested configs are used in combination with runtime config.My implementation feels a bit hacky to me, so please let me know if there are any changes to be made! 😄