e69500462d
Production middlewares will only expose env vars that are statically analyzable, as mentioned here: https://nextjs.org/docs/api-reference/next/server#how-do-i-access-environment-variables This creates some incompatibility with `next dev` and `next start`, where all `process.env` data is shared and can lead to unexpected behavior in runtime. This PR fixes it by limiting the data in `process.env` with the inferred env vars from the code usage. I believe the test speaks for itself 🕺 <!-- ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint` --> |
||
---|---|---|
.. | ||
dev | ||
lib | ||
web | ||
accept-header.ts | ||
api-utils.ts | ||
base-server.ts | ||
config-shared.ts | ||
config-utils.ts | ||
config.ts | ||
crypto-utils.ts | ||
denormalize-page-path.ts | ||
font-utils.ts | ||
get-page-files.ts | ||
get-route-from-entrypoint.ts | ||
htmlescape.ts | ||
image-config.ts | ||
image-optimizer.ts | ||
incremental-cache.ts | ||
load-components.ts | ||
next-server.ts | ||
next.ts | ||
node-polyfill-fetch.js | ||
normalize-page-path.ts | ||
optimize-amp.ts | ||
render-result.ts | ||
render.tsx | ||
request-meta.ts | ||
require.ts | ||
response-cache.ts | ||
router.ts | ||
send-payload.ts | ||
serve-static.ts | ||
utils.ts |