### Link to the code that reproduces this issue https://codesandbox.io/p/devbox/competent-heyrovsky-9hgm8f?file=%2F.next%2Fstandalone%2Fserver.js%3A12%2C5416-12%2C5425 ### To Reproduce Steps to reproduce: 1. run npm build 2. check the server.js inside the output folder ### Current vs. Expected behavior When using Environment-Variables with Standalone-Output Mode, the Environment-Variables are resolved only at Build time for the nextConfig. If i look at the documentation: https://nextjs.org/docs/pages/guides/environment-variables#runtime-environment-variables i can not see why it shoud not work, since this fits the description: > By default, environment variables are only available on the server. Take a look at the created server.js in the standalone Folder -> process.env.API_BASE_URL is resolved to a hardcoded value (http://localhost:8080) inside the constant nextConfig. This happens only at build time and we are not capable of overriding this value at runtime without hacks. If this behavior is intended it should be added to the documentation. ### Provide environment information ```bash Operating System: Platform: linux Arch: x64 Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023 Available memory (MB): 4242 Available CPU cores: 2 Binaries: Node: 20.9.0 npm: 9.8.1 Yarn: 1.22.19 pnpm: 8.10.2 Relevant Packages: next: 15.4.0-canary.16 // Latest available version is detected (15.4.0-canary.16). eslint-config-next: N/A react: 19.1.0 react-dom: 19.1.0 typescript: 5.3.3 Next.js Config: output: standalone ``` ### Which area(s) are affected? (Select all that apply) Output ### Which stage(s) are affected? (Select all that apply) next build (local) ### Additional context Local we are still at next 14.2.28, so i suppose this behavior exists from next 14 at least.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by gianluca1606 and has received 0 comments.