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
Unfortunately Nuxt 3 doesn't allow to change env variables used in the nuxt.config.ts at runtime. They are build-time only.
In our pipeline we first build nuxt and then add the environment variables. However, the nuxt.config.ts will still have the undefined values. That's why we need to be able to edit the config at runtime.
The following nuxt config works fine in development but BACKEND_IMAGES_ENDPOINT is undefined in production deployment:
exportdefaultdefineNuxtConfig({// also doesn't work with NUXT_ or NUXT_PUBLIC_ prefixdomains: [process.env.BACKEND_IMAGES_ENDPOINT],alias: {"/images": `${process.env.BACKEND_IMAGES_ENDPOINT}/images`},},})
I am using the IPX provider and could create a yarn patch to fix this issue for my specific case:
Uh oh!
There was an error while loading. Please reload this page.
Unfortunately Nuxt 3 doesn't allow to change env variables used in the
nuxt.config.ts
at runtime. They are build-time only.In our pipeline we first build nuxt and then add the environment variables. However, the
nuxt.config.ts
will still have theundefined
values. That's why we need to be able to edit the config at runtime.The following nuxt config works fine in development but
BACKEND_IMAGES_ENDPOINT
is undefined in production deployment:I am using the IPX provider and could create a yarn patch to fix this issue for my specific case:
This is obviously bad, but hopefully helps you understand my issue better.
The text was updated successfully, but these errors were encountered: