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

Disable define substitution #2166

Closed
arv opened this issue Apr 8, 2022 · 1 comment
Closed

Disable define substitution #2166

arv opened this issue Apr 8, 2022 · 1 comment

Comments

@arv
Copy link

arv commented Apr 8, 2022

I would like to minimize my code but keep process.env.NODE_ENV in the bundled resulting code.

I cannot figure out how to disable the automatic define when minimize is true

@evanw
Copy link
Owner

evanw commented Apr 11, 2022

This is something that esbuild only does when platform is browser (which is the default). You can change it to either node or neutral to disable this: https://esbuild.github.io/api/#platform.

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

No branches or pull requests

2 participants