unjs / c12

⚙️ Smart Configuration Loader
MIT License
447 stars 18 forks source link

Consider supporting multiple scoped env files #68

Open pi0 opened 1 year ago

pi0 commented 1 year ago

Frameworks such as vite, support more than one env file like .env.local and .env.prod.

This is heavily discouraged by 12 factor and dotenv package however this is a common usage for FE projects and now that we support env scoped options, kinda makes sense to rethink about cons/pros and possibly supporting.

michael-bouvy commented 1 year ago

Great! Is there a way c12's setupDotEnv function could also be called in production builds, as it is already for dev and preview modes?

pi0 commented 1 year ago

@michael-bouvy ~> https://github.com/unjs/nitro/issues/1079