Skip to content

[Feature Request] Preset support #493

@mmikhan

Description

@mmikhan

Description

I am a long time user of T3 Env. It's not perfect but it's what I have got until I found Varlock. Varlock is what I have wanted an env management would be. It's also not 100% perfect but the best one I could find so far. So, thanks for making this.

Motivation

One of the feature of T3 Env is Preset. A preset is a collection of env vars. For example, there's a preset for Vercel and another one is for Vite. Vite offers a few built-in constants that every project has access to.

So, instead of recreating the same vars everyone using Varlock on their projects, we could simply use the Vite preset as the built-in constants are there for us to use.

Proposed Solution

Varlock offers @import() root decorator out of the box. We could use the @import(Vite) to import the Vite preset and use the ENV.mode in a normal way.

Alternatively, there could be a new root decorator called @preset() and we pass the preset name to it as arg, @preset(Vite).

Or a better way that I can't think of 😉

Alternatives

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions