Skip to content

Object with both private and public env vars #15414

@Stadly

Description

@Stadly

Describe the problem

I often need both a private and a public env var on the server, so I have to do something like this which is a bit tedious:

import { env as privateEnv } from "$env/dynamic/private";
import { env as publicEnv } from "$env/dynamic/public";

Describe the proposed solution

Either include the public env vars in $env/dynamic/private, or create common import { env } from "$env/dynamic" that is only usable on the server and includes both private and public env vars.

Alternatives considered

No response

Importance

nice to have

Additional Information

Related: #8474

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions