You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently enviroment variables that are not prefixed with VITE_ will not be loaded,
variables that are prefixed with VITE_ will be exposed to the client (import.meta.env),
what causing it so there is no such thing as server env variable in SolidStart.
this could easily be fixed using dotenv:
importsolidfrom"solid-start/vite";importdotenvfrom"dotenv";importUnoCSSfrom"unocss/vite";import{defineConfig}from"vite";// @ts-expect-error no typingimportvercelfrom"solid-start-vercel";exportdefaultdefineConfig(()=>{dotenv.config();return{plugins: [solid({ssr: false,adapter: vercel({edge: false})}),UnoCSS(),],};});
but I think that it should not be handled in our end as SolidStart is a meta framework, and should be loading server variables by default.
The text was updated successfully, but these errors were encountered:
I agree. I imagine you have an idea of what this should look like. Is it just adding dotenv? Open to following your lead here as I've never really looked at this part in other meta frameworks. I've heard that SvelteKit does well here but that's about it.
Are these build-time or runtime variables? i.e. if you do a production build and have not yet defined VITE_SOMETHING then will VITE_SOMETHING be available on the client if it is only defined before running the build?
SveltKit supports both static (build time) and dynamic (runtime) variables and docker containers, k8s will want to use runtime and not build time since secrets maybe are not baked into the container and are provided later.
Currently enviroment variables that are not prefixed with
VITE_
will not be loaded,variables that are prefixed with
VITE_
will be exposed to the client (import.meta.env
),what causing it so there is no such thing as
server env variable
in SolidStart.this could easily be fixed using dotenv:
but I think that it should not be handled in our end as SolidStart is a meta framework, and should be loading server variables by default.
The text was updated successfully, but these errors were encountered: