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: add NODE_ENV to define only if it is set #206

Closed
wants to merge 1 commit into from
Closed

fix: add NODE_ENV to define only if it is set #206

wants to merge 1 commit into from

Conversation

pkerschbaum
Copy link

@pkerschbaum pkerschbaum commented Jan 12, 2023

closes #205

What: #205

Why: esbuild >= 0.16.0 forces that something passed via define is a string. This was introduced in v0.16.0, see section "Add additional validation of API parameters" of https://github.com/evanw/esbuild/releases/tag/v0.16.0.

How: 'process.env.NODE_ENV' is only set in define from now on if it is not undefined.

Checklist:

  • Documentation
  • Tests
    • Unfortunately I could not reproduce it via the tests in the repository, even if I updated the devDependency esbuild...
    • But I patched it for my project with pnpm patch and it worked: pkerschbaum/pkerschbaum-homepage@93acaca
  • Ready to be merged
    • Apart from the missing test, it is ready to be merged.

@pkerschbaum pkerschbaum changed the title fix: add NODE_ENV to define only if set fix: add NODE_ENV to define only if it is set Jan 12, 2023
pkerschbaum added a commit to pkerschbaum/pkerschbaum-homepage that referenced this pull request Feb 10, 2023
@pkerschbaum pkerschbaum closed this by deleting the head repository Nov 5, 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.

Error when using esbuild@0.16.17 "Expected value for define "process.env.NODE_ENV" to be a string"
1 participant