mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Update define-constant.md
This commit is contained in:
@@ -51,6 +51,8 @@ if (true) {
|
||||
|
||||
And finally, Bun detects the `else` branch is not reachable, and eliminates it.
|
||||
|
||||
---
|
||||
|
||||
```ts
|
||||
console.log("Production mode");
|
||||
```
|
||||
@@ -63,6 +65,8 @@ Values can be strings, identifiers, properties, or JSON.
|
||||
|
||||
To make all usages of `window` be `undefined`, you can use the following command.
|
||||
|
||||
---
|
||||
|
||||
```sh
|
||||
bun --define window="undefined" src/index.ts
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user