Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(define): allow define process.env #15173

Merged
merged 1 commit into from
Nov 29, 2023
Merged

fix(define): allow define process.env #15173

merged 1 commit into from
Nov 29, 2023

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Nov 29, 2023

Description

fix #15164

Allow define to override what process.env replaces, same as Vite 4. It works before because we replace things like this instead: https://github.com/vitejs/vite/pull/11151/files#diff-d90a7c21c9fb9222e557704bd906ea5671d5fe384c8fb105459eea8c36fdb4f0L22-R23

Additional context

Personally I don't think this is a good pattern in general, but I suppose it doesn't hurt to support it for now.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines, especially the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Update the corresponding documentation if needed.
  • Ideally, include relevant tests that fail without this PR but pass with it.

@bluwy bluwy added the p3-minor-bug An edge case that only affects very specific usage (priority) label Nov 29, 2023
@patak-dev patak-dev merged commit ec401da into main Nov 29, 2023
10 checks passed
@patak-dev patak-dev deleted the define-process-env branch November 29, 2023 09:37
@patak-dev
Copy link
Member

/ecosystem-ci run

@vite-ecosystem-ci

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vite v5.0.2 | vite.config.js - config define | process.env variables on production not available anymore
3 participants