Skip to content

SvelteKit Remote Functions – Env Variable Bug #14439

@hendrik-huels

Description

@hendrik-huels

Describe the bug

When I access dynamic environment variables using $env/dynamic/private and store them in a const in a shared server module ($lib/server/index.ts), everything works except when that module is used in a remote function — then the variables become globally undefined while build time.

Reproduction

REPRO-REPO

Logs

System Info

@sveltejs/[email protected] (or Higher)

Severity

blocking an upgrade

Additional Information

You can find more information inside the reproduction repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions