Skip to content

fix: preserve process.env reference using Object.assign#52

Open
rafaumeu wants to merge 2 commits into
louvorja:mainfrom
rafaumeu:fix/process-env-override
Open

fix: preserve process.env reference using Object.assign#52
rafaumeu wants to merge 2 commits into
louvorja:mainfrom
rafaumeu:fix/process-env-override

Conversation

@rafaumeu

Copy link
Copy Markdown

Summary

Fixes #46

vite.config.js was overwriting the entire process.env object with a direct assignment, which replaces the original reference and can break imported modules that captured the reference earlier.

Fix

Replaced process.env = { ...process.env, ...loadEnv(...) } with Object.assign(process.env, loadEnv(...)) which mutates in-place.

Testing

  • No behavior change in normal usage
  • Preserves all existing env vars and references

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: process.env sobrescrito por atribuição direta em vite.config.js

1 participant