Skip to content

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

Merged
patak-cat merged 1 commit intomainfrom
define-process-env
Nov 29, 2023
Merged

fix(define): allow define process.env#15173
patak-cat merged 1 commit intomainfrom
define-process-env

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-cat patak-cat merged commit ec401da into main Nov 29, 2023
@patak-cat patak-cat deleted the define-process-env branch November 29, 2023 09:37
@patak-cat
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