Closed as not planned
Description
Link to the code that reproduces this issue
To Reproduce
- In .env file define
NEXT_PUBLIC_SOMETHING
variable and add comment after it as#some comment that should not be loaded
- Use the
NEXT_PUBLIC_SOMETHING
variable somewhere and log it. - Start the application and see that both the value and the comment are printed in the log.
Current vs. Expected behavior
Currently the dotenv loader loads everything after the =
sign.
Expected behaviour would be that the loader only loads the value and not the comment.
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:34 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8103
Binaries:
Node: 21.1.0
npm: 10.2.0
Yarn: 1.22.19
pnpm: N/A
Relevant Packages:
next: 13.4.9
eslint-config-next: 13.4.9
react: 18.2.0
react-dom: 18.2.0
typescript: 5.1.6
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Not sure
Additional context
No response