Skip to content

fix(env): do not inline process.env - #14712

Merged
florian-lefebvre merged 2 commits into
mainfrom
fix/do-not-inline-process-env
Nov 7, 2025
Merged

florian-lefebvre merged 2 commits into
mainfrom
fix/do-not-inline-process-env

Conversation

@florian-lefebvre

Copy link
Copy Markdown
Member

Changes

  • Reported on docs: add note about environment variables with output: 'server' docs#12648
  • During an Astro build, Vite is started in dev and build several times, sometimes even in parallel
  • The astro:env Vite plugin had some caching logic that retained the dev behavior in build, resulting in inlining process.env in the build output in some cases
  • This PR refactors this Vite plugin to avoid this situation

Testing

Manual, should pass

Docs

Changeset

@florian-lefebvre florian-lefebvre self-assigned this Nov 4, 2025
@github-actions github-actions Bot added the pkg: astro Related to the core `astro` package (scope) label Nov 4, 2025
@changeset-bot

changeset-bot Bot commented Nov 4, 2025 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4ed97ff

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codspeed

codspeed Bot commented Nov 4, 2025 •

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #14712 will not alter performance

Comparing fix/do-not-inline-process-env (4ed97ff) with main (970ac0f)1

Summary

✅ 6 untouched

Footnotes

  1. No successful run was found on main (dae9d3f) during the generation of this report, so 970ac0f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@florian-lefebvre
florian-lefebvre merged commit 91780cf into main Nov 7, 2025
26 checks passed
@florian-lefebvre
florian-lefebvre deleted the fix/do-not-inline-process-env branch November 7, 2025 18:51
@astrobot-houston astrobot-houston mentioned this pull request Nov 7, 2025
natemoo-re pushed a commit to natemoo-re/astro that referenced this pull request Nov 8, 2025
* fix(env): do not inline process.env

* feat: simplify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants