Replies: 1 comment 5 replies
-
i am pretty sure that is just the way it works even outside Quinoa. Typically most users have two env files one for Development and one for Production.
and if it uses Vite or most packagers it uses dev in dev mode and uses the production values in production build. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a single page application written with sveltekit. In that app I want to use a dynamic environment variable , let's say PUBLIC_IS_TEST, I can consume it in svelte by
import {env} from '$env/dynamic/public'
and then use it :console.log(env.PUBLIC_IS_TEST)
That works fine when starting it via
npm run dev
. However, when I integrate the SPA in my backend (web-api with quarkus and kotlin) with quinoa, it works no longer. When there are some environment variables defined at build time, they get captured, but are fixed. I can't change them later for runtime.Is there a way to solve that?
Update: for now I use Quarkus' environment variables and expose the ones, that are actually for the frontend via an endpoint. Not a real solution, but a workaround...
Beta Was this translation helpful? Give feedback.
All reactions