-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom env variable #301
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently some of the config set in
plenti.json
can be referenced in the magicenv
prop available at the top-level/layouts/global/html.svelte
of your project:env.baseurl
env.local
env.entrypointHTML
env.entrypointJS
env.cms.repo
env.cms.redirectUrl
env.cms.appId
env.cms.branch
I wonder if it makes sense to reserve
env
for custom key/values and instead pull defined settings out of a new variable calledconfig
:config.baseurl
config.local
config.entrypointHTML
config.entrypointJS
config.cms.repo
config.cms.redirectUrl
config.cms.appId
config.cms.branch
config.env.myCustomKey
<-- User defined underenv
key inplenti.json
config.env.myCustomKey2
<-- SameMost projects allow for a
.env
file, but since we allow individual builds per environment (e.g. local / dev / stg / prod / etc.. per #183) usingplenti.json
config files, I think it makes the most sense to require that we define them there.To avoid introducing a breaking change we could keep
env
and using a subcategory ofcustom
or something instead. Would like to emphasize the best naming over backwards compatibility though.The text was updated successfully, but these errors were encountered: