Description
Describe the problem
#5663 adds a new set of modules — $env/static/private
, $env/static/public
, $env/dynamic/private
and $env/dynamic/public
. These explicitly relate to environment variables aka 'env vars', and as such it's mildly confusing that env
is also used in $app/env
to mean something completely different.
The values exported from $app/env
are browser
, dev
and prerendering
.
Describe the proposed solution
I like $app/mode
, since browser
, dev
and prerendering
are all modes the app is running in. The one downside to that — it uses a word that Vite means something else by — seems very inconsequential (software using words in different ways is far from a new phenomenon).
Alternatives considered
$app/type
and $app/static
have been suggested. I don't personally love these — type
suggests a fixed characteristic of the app, and static
merely describes a quality that browser
/dev
/prerendering
have while the app is running, without saying anything about what they are.
My first thought was $app/context
, since everyone loves a bit of context. But we've been here before.
Importance
nice to have
Additional Information
No response