diff --git a/docs/guides/runtime/define-constant.md b/docs/guides/runtime/define-constant.md index e691cd4d79..6051bf30aa 100644 --- a/docs/guides/runtime/define-constant.md +++ b/docs/guides/runtime/define-constant.md @@ -69,6 +69,8 @@ To make all usages of `window` be `undefined`, you can use the following command bun --define window="undefined" src/index.ts ``` +--- + This can be useful when Server-Side Rendering (SSR) or when you want to make sure that the code doesn't depend on the `window` object. ```js @@ -91,8 +93,6 @@ bun --define global="globalThis" src/index.ts `global` is a global object in Node.js, but not in web browsers. So, you can use this to fix some cases where the code assumes that `global` is available. ---- - ### Replace values with JSON `--define` can also be used to replace values with JSON objects and arrays.