Skip to content

Commit

Permalink
Update define-constant.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Apr 23, 2024
1 parent 1a17d71 commit d690504
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/guides/runtime/define-constant.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ if (true) {

And finally, Bun detects the `else` branch is not reachable, and eliminates it.

---

```ts
console.log("Production mode");
```
Expand All @@ -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
```
Expand Down

0 comments on commit d690504

Please sign in to comment.