Skip to content

Add possibility to prefix EnvVar Names #1898

@dersia

Description

@dersia

we are using Vite to run our react frontends. adding those with AddNpmApp works well, but the problem is, that the environment variables are not available to the frontend.

as per Vite Documentation environment variables are only available in vite, if the name begins with VITE_.

so I suggest to add a WithEnvironmentPrefix(string prefix) method to set the prefix for all the exposed environment variables like service URLs, Otlp endpoints etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions