Skip to content

fix(bundling): fix regression on process.env usage for webpack#34583

Merged
jaysoo merged 1 commit intomasterfrom
issue-34279
Feb 25, 2026
Merged

fix(bundling): fix regression on process.env usage for webpack#34583
jaysoo merged 1 commit intomasterfrom
issue-34279

Conversation

@jaysoo
Copy link
Copy Markdown
Member

@jaysoo jaysoo commented Feb 24, 2026

When we optimized the process.env values to not embed the full object
unnecessarily, we also regressed in cases where users do use
process.env instead of process.env["NX_PUBLIC_FOO"].

Current behavior

Users cannot use process.env and must access each key individuall.
Although the serializing the full object can bloat bundle sizes, we also
don't want to break existing apps unnecessarily.

Expected behavior

Existing apps should continue to work as usual.

Related issues

Fixes #34279

@jaysoo jaysoo requested a review from a team as a code owner February 24, 2026 20:00
@jaysoo jaysoo requested a review from Coly010 February 24, 2026 20:00
@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud bot commented Feb 24, 2026

View your CI Pipeline Execution ↗ for commit 069753c

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 1h 14m 15s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3m 12s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 8s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-24 23:13:07 UTC

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 24, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 069753c
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/699e1e26f7df7c000833c056
😎 Deploy Preview https://deploy-preview-34583--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 24, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 069753c
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/699e1e260ea9c70008868a4b
😎 Deploy Preview https://deploy-preview-34583--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

nx-cloud[bot]

This comment was marked as outdated.

  When we optimized the `process.env` values to not embed the full object
  unnecessarily, we also regressed in cases where users do use
  `process.env` instead of `process.env["NX_PUBLIC_FOO"]`.

  ## Current behavior

  Users cannot use `process.env` and must access each key individuall.
  Although the serializing the full object can bloat bundle sizes, we also
  don't want to break existing apps unnecessarily.

  ## Expected behavior

  Existing apps should continue to work as usual.

  ## Related issues

  Fixes #34279
@jaysoo jaysoo merged commit 127255a into master Feb 25, 2026
24 checks passed
@jaysoo jaysoo deleted the issue-34279 branch February 25, 2026 13:16
FrozenPandaz pushed a commit that referenced this pull request Feb 26, 2026
When we optimized the `process.env` values to not embed the full object
unnecessarily, we also regressed in cases where users do use
`process.env` instead of `process.env["NX_PUBLIC_FOO"]`.

## Current behavior

Users cannot use `process.env` and must access each key individuall.
Although the serializing the full object can bloat bundle sizes, we also
don't want to break existing apps unnecessarily.

## Expected behavior

Existing apps should continue to work as usual.

## Related issues

Fixes #34279

(cherry picked from commit 127255a)
FrozenPandaz pushed a commit that referenced this pull request Feb 26, 2026
When we optimized the `process.env` values to not embed the full object
unnecessarily, we also regressed in cases where users do use
`process.env` instead of `process.env["NX_PUBLIC_FOO"]`.

## Current behavior

Users cannot use `process.env` and must access each key individuall.
Although the serializing the full object can bloat bundle sizes, we also
don't want to break existing apps unnecessarily.

## Expected behavior

Existing apps should continue to work as usual.

## Related issues

Fixes #34279

(cherry picked from commit 127255a)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][Webpack] process.env is no longer parsed after v22.2.2

2 participants