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
Neither. This is a missing feature (but a reasonable one to add IMO). Support for these types of expressions has been added to --global-name but not yet to --define.
esbuild: playground url:
https://esbuild.github.io/try/#dAAwLjI0LjAALS1kZWZpbmU6cHJvY2Vzcy5lbnZbXCJTT01FLVRFU1RcIl09MTIzAGNvbnNvbGUubG9nKHByb2Nlc3MuZW52WyJTT01FLVRFU1QiXSk
There are some cases when using
--define
where identifiers need to be wrapped in quotes.This is a minimal example of a case where this is needed.
(if you're using zsh, try this instead:
npx esbuild --define:process.env\[\\\"SOME-TEST-VAR\\\"\]=123 test.js
)This will throw an error:
I've tried variations around quotes, but I can't get it to work. Am I doing something wrong, or is this a bug?
The text was updated successfully, but these errors were encountered: