You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am working on a vite project where I need to use esbuild-wasm to build some user-provided code. I have some code like
import*asesbuildfrom"esbuild-wasm"// some initialization awaitesbuild.build({// other configurationsdefine: {"process.env.NODE_ENV": "production"}})
where the define key should set env vars for esbuild-wasm. However, when I run vite to serve locally the "process.env.NODE_ENV" string is being interpolated by vite to become ""development"" in the browser. Is there a way to prevent this behaviour?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi I am working on a vite project where I need to use
esbuild-wasm
to build some user-provided code. I have some code likewhere the
define
key should set env vars for esbuild-wasm. However, when I run vite to serve locally the "process.env.NODE_ENV" string is being interpolated by vite to become ""development"" in the browser. Is there a way to prevent this behaviour?Beta Was this translation helpful? Give feedback.
All reactions