Skip to content

krall12/nextjs-env-config-dev-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nextjs-env-config-dev-bug

Bug:

Environment variables defined in next.config.js can not be read in page components in dev (yarn dev) but they can be read in production mode (yarn build && yarn start).

Reproduce

On [email protected]:

  • Run this project in dev (yarn dev) mode

  • Load the home page -- the environment variable is undefined

  • Run this sproject in production (yarn build && yarn start) mode

  • Load the home page -- the environment variable IS defined now

Control

As a control I ran this project on [email protected]. In that version the environment variable is defined in both dev and production modes.

About

This is a reproduction of a bug found in [email protected]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published