What is the right environment variable and value to set when building for production? #2011
-
For a SSR'd However, the deployment documentation in the book here: sets the I am trying to confirm the exact enviroment variable and its corresponding value to set in my production builds. Is the value "PROD" or "production"? And is the variable name documented in the book accurate? Thoughts on the right value to be used? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Beta Was this translation helpful? Give feedback.
Sorry, I misread your question above.
This is a case in which I need to look through the source code to find the answer, so I'm going to do that, and paste in what I find, so you can see how I did that.
Searching in the Leptos repo for
LEPTOS_ENV
brings me toleptos_config/src/lib.rs
and to the default initialization of a field in the definition of a struct calledLeptosOptions
leptos/leptos_config/src/lib.rs
Line 96 in 8573f22
Ok, so the struct field is named
env
and the environment variable isLEPTOS_ENV
.I'm curious what the type of
env
is, so I scroll up and see that it's...Env
leptos/leptos_config…