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: don't transform process.env. when build target is node #7810

Closed
wants to merge 1 commit into from
Closed

fix: don't transform process.env. when build target is node #7810

wants to merge 1 commit into from

Conversation

alex8088
Copy link

Description

When build target is node, process.env. will be left as is without transformation. Currently, process.env.FOO will always be transformed as ({}).FOO, which is undesirable when running in node.

Additional context


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.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • 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).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@bluwy
Copy link
Member

bluwy commented Apr 19, 2022

Can you clarify why node is set for build.target? The option is used to define browser compatibility only, and using node doesn't sound right.

@alex8088
Copy link
Author

Can you clarify why node is set for build.target? The option is used to define browser compatibility only, and using node doesn't sound right.

When we are developing a node oriented library,we sometimes need to use process.env.

@ayuhito ayuhito mentioned this pull request Apr 20, 2022
4 tasks
@benmccann
Copy link
Collaborator

benmccann commented Mar 14, 2023

Also proposed in #8843. #5577 seems like it may be targeting the same issue as well

@alex8088 alex8088 closed this by deleting the head repository Jul 24, 2023
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.

None yet

3 participants