\r\n \u003C/div>\r\n\u003C/template>\r\n\u003Cscript setup>\r\nconst config = useRuntimeConfig();\r\nconsole.log(config);\r\n\u003C/script>\r\n\r\n```\r\n\r\nNow, when I build the project using `yarn build` and then run the production build using `node .output/server/index.mjs`, I get the following output:\r\n\r\n```shell\r\n~/projects/nuxt-starter-ilkcf5 6s\r\n❯ node .output/server/index.mjs\r\nListening http://[::]:3000\r\n{\r\n app: { baseURL: '/', buildAssetsDir: '/_nuxt/', cdnURL: '' },\r\n nitro: { routeRules: { '/__nuxt_error': [Object] }, envPrefix: 'NUXT_' },\r\n public: { apiBaseUrl: '' }\r\n}\r\n```\r\n\r\nNotice that the `config` variable that is getting logged in `app.vue` has a public key of `apiBaseUrl` as `\"\"` as opposed to `http://localhost:8000` as defined in the `.env` file.\r\n\r\nNOTE that this is not an issue when running `yarn dev`.\r\n\r\nJust want to know if this is really a bug or am I missing a step here.\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n```shell\r\n~/projects/nuxt-starter-ilkcf5 6s\r\n❯ node .output/server/index.mjs\r\nListening http://[::]:3000\r\n{\r\n app: { baseURL: '/', buildAssetsDir: '/_nuxt/', cdnURL: '' },\r\n nitro: { routeRules: { '/__nuxt_error': [Object] }, envPrefix: 'NUXT_' },\r\n public: { apiBaseUrl: '' }\r\n}\r\n```\r\n",[2948,2949],{"name":2908,"color":2909},{"name":2879,"color":2880},15696,"Environment variables not synced from `.env` file on production build.","2023-01-19T18:20:11Z","https://github.com/nuxt/nuxt/issues/15696",0.649329,{"description":2956,"labels":2957,"number":2960,"owner":2869,"repository":2869,"state":2899,"title":2961,"updated_at":2942,"url":2962,"score":2963},"### Is your feature request related to a problem? Please describe.\r\n\r\nI am working on a new deployment structure using docker. There are some nuxt libraries like [`@nuxtjs/proxy`](https://github.com/nuxt-community/proxy-module) or [`@nuxtjs/apollo`](https://github.com/nuxt-community/apollo-module). These modules require a URL in the config of the proxy or the GraphQL endpoint.\r\n\r\nOf course there are the `privateRuntimeConfig` and `publicRuntimeConfig` that give you the ability to pass env variables on runtime. But I could not find any documentation on using the runtime config inside of the `nuxt.config.js`.\r\n\r\n### Describe the solution you'd like\r\n\r\nAbilty to access runtime env inside of the nuxt config. I don't have a concise idea on how to do this. But maybe it is a possibility to extend the config passed on the base nuxt config inside of function with the context. Something like this:\r\n\r\n```\r\n{\r\n publicRuntimeConfig: {\r\n baseURL: process.env.BASE_URL || 'https://nuxtjs.org'\r\n },\r\n extend(ctx): {\r\n ctx.proxy = {\r\n '/api/': ctx.config.baseURL\r\n }\r\n }\r\n}\r\n```\r\n\r\n\r\n### Describe alternatives you've considered\r\n\r\nI am suspecting that I am missing something while reading in the docs but right now thee only way for me to do it now is to build the application with the .env variables already present. But this is a bad practice because this means my docker image is only built for one environment and not environment agnostic.\r\n",[2958,2959],{"name":2893,"color":2894},{"name":2896,"color":2897},8634,"Using runtime config in nuxt.config.js","https://github.com/nuxt/nuxt/issues/8634",0.65079415,{"description":2965,"labels":2966,"number":2969,"owner":2869,"repository":2869,"state":2899,"title":2970,"updated_at":2971,"url":2972,"score":2973},"### Environment\r\n\r\nNuxt CLI v3.0.0-rc.8 \r\n\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.14.2`\r\n- Nuxt Version: `3.0.0-rc.8`\r\n- Package Manager: `npm@7.17.0`\r\n- Builder: `vite`\r\n- User Config: `runtimeConfig`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nSample: https://stackblitz.com/edit/github-dnbk4c-y5bqyg?file=package.json,nuxt.config.tsnp\r\nThe config:\r\n```js\r\nexport default defineNuxtConfig({\r\n runtimeConfig: {\r\n public: {\r\n API_HOST: process.env.API_HOST || '',\r\n },\r\n },\r\n});\r\n```\r\n\r\nSteps:\r\n1. yarn build\r\n2. Create a env var via: export API_HOST=\"something\"\r\n3. yarn start\r\n\r\nLook at the console log which prints out the runtime config\r\n\r\n### Describe the bug\r\n\r\nEnvironment variable set after the nuxt build are not being registered in the runtime config\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2967,2968],{"name":2857,"color":2858},{"name":2908,"color":2909},14721,"Enivornment variables in runtimeConfig not being set at runtime (Nuxt rc.8)","2023-01-19T17:39:20Z","https://github.com/nuxt/nuxt/issues/14721",0.6525315,{"description":2975,"labels":2976,"number":2979,"owner":2869,"repository":2869,"state":2899,"title":2980,"updated_at":2981,"url":2982,"score":2983},"### Environment\r\n\r\nRootDir: /home/projects/github-qrbpqh 05:30:19\r\nNuxt project info: 05:30:19\r\n\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.14.2`\r\n- Nuxt Version: `3.1.1`\r\n- Nitro Version: `2.1.1`\r\n- Package Manager: `npm@7.17.0`\r\n- Builder: `vite`\r\n- User Config: `runtimeConfig`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/github-qrbpqh?file=app.vue,nuxt.config.ts\r\n\r\n1. Add a `.env` to the base dir:\r\n\r\n```bash\r\nNUXT_PUBLIC_SITE_URL=\"http://mysite.com\"\r\n```\r\n\r\nRun `npm install && npm run dev`.\r\n\r\nYou see that the `nuxt-simple-sitemap` module, which depends on the `runtimeConfig.public.siteUrl` being defined, throwing an error.\r\n\r\n### Describe the bug\r\n\r\nThe docs say you can write env variables like this:\r\n\r\nhttps://nuxt.com/docs/guide/going-further/runtime-config#environment-variables\r\n\r\n```ts\r\nexport default defineNuxtConfig({\r\n runtimeConfig: {\r\n apiSecret: '', // can be overridden by NUXT_API_SECRET environment variable\r\n public: {\r\n apiBase: '', // can be overridden by NUXT_PUBLIC_API_BASE environment variable\r\n }\r\n },\r\n})\r\n```\r\n\r\nand `.env`\r\n\r\n```\r\nNUXT_API_SECRET=api_secret_token\r\nNUXT_PUBLIC_API_BASE=https://nuxtjs.org\r\n```\r\n\r\nIn the newest nuxt version, this does not work anymore. The string stays empty after build, so the `.env` variables are not injected.\r\n\r\nWhat works is setting it manually like\r\n\r\n```ts\r\nexport default defineNuxtConfig({\r\n runtimeConfig: {\r\n apiSecret: process.env.NUXT_API_SECRET,\r\n public: {\r\n apiBase: process.env.NUXT_PUBLIC_API_BASE,\r\n }\r\n },\r\n})\r\n```\r\n\r\nIf this is by intention, I would add a PR to the docs to make it clear that modules do not have access to the config if you are using the empty-string syntax. Or I think it would actually be even clearer to get rid of that syntax and suggest always use the `process.env.NUXT_...` directly. \r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2977,2978],{"name":2908,"color":2909},{"name":2879,"color":2880},18692,"[Nuxt 3.1.1] Defining `runtimeConfig.public.myValue = ''` is not injected with `.env` at runtime of a module","2023-02-02T15:16:10Z","https://github.com/nuxt/nuxt/issues/18692",0.65469176,["Reactive",2985],{},["Set"],["ShallowReactive",2988],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fC-Y9V81jblZGZ-hcKrkIMIEmdvBBm9OXhs2UFK-5cVA":-1},"/nuxt/nuxt/30605"]