nuxt-community / dotenv-module

Loads your .env file into your application context
MIT License
495 stars 30 forks source link

feat: make system vars override dotenv vars #55

Closed z0w13 closed 3 years ago

pi0 commented 4 years ago

@z0w13 Thanks for the PR btw :heart: I will come up with a better solution soon please hold on :)

z0w13 commented 4 years ago

This is a breaking change and can potentially expose system environment variables to the client bundle (override .env)

Would this be an issue in SSR mode then? I've only tested it without and if building your bundle does malicious things you've got bigger issues than some env vars leaking

pi0 commented 4 years ago

https://github.com/nuxt/nuxt.js/pull/7312

The proposed new behavior is system vars have higher-periority but need to specify in runtimeConfig (or you can provide in env with own risk ;D)

atinux commented 3 years ago

Closing in favour of using runtimeConfig in Nuxt: https://nuxtjs.org/blog/moving-from-nuxtjs-dotenv-to-runtime-config#migrating-to-the-nuxtjs-runtime-config-from-nuxtjsdotenv

This module will be deprecated quite soon.