-
Notifications
You must be signed in to change notification settings - Fork 29.5k
Milestone
Description
Bug report
Describe the bug
v8.1.1-canary.62 (or maybe 3aed76f) (re-)introduces an issue with how I use (and recommend how to use) https://github.com/tusbar/next-runtime-dotenv.
To Reproduce
This breaks on build as publicRuntimeConfig
is undefined
at build time:
const {
publicRuntimeConfig: {MY_API_URL}
} = getConfig()
Expected behavior
publicRuntimeConfig
used to be {}
at build time.
System information
- OS: macOS
- Version of Next.js: 8.1.1-canary.62
Additional context
This is not the first time this breaks, maybe it would be nice to add a test. It used to work fine with 8.0.4
, it’s broken in 8.1.0
and used to work fine in canary before 8.1.1-canary.62
. Broken in 9.0
as well.