Env variables from .env*
file don't expose to next.config.*
anymore
#22881
Labels
bug
Issue was opened via the bug report template.
What version of Next.js are you using?
10.0.8
What version of Node.js are you using?
14.7.0
What browser are you using?
any
What operating system are you using?
macOS
How are you deploying your application?
local, codesandbox
Describe the Bug
Env variables don't expose to
next.config.js
and not available w/o manual usingdotenv
package.Seems like after '10.0.8' nextjs starts to use
next-env
afternext.config
loaded.Expected Behavior
We should be able to use Env variables in
next.config
,webpack
,plugins
configurations.To Reproduce
Sandbox with 10.0.8 and the behavior:
https://codesandbox.io/s/nextjs-1008-process-env-bug-wmwkn
in terminal
Sandbox with 10.0.7 w/o:
https://codesandbox.io/s/nextjs-1007-process-env-nvnnh
in terminal
The text was updated successfully, but these errors were encountered: