aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/bundler/macros.md8
1 files changed, 1 insertions, 7 deletions
diff --git a/docs/bundler/macros.md b/docs/bundler/macros.md
index e2693de71..3c6be7097 100644
--- a/docs/bundler/macros.md
+++ b/docs/bundler/macros.md
@@ -29,7 +29,7 @@ $ bun build ./cli.tsx
console.log(`Your random number is ${0.6805550949689833}`);
```
-As you can see, the source code of the `random` function occurs nowhere in the bundle. Instead, it is executed _during bundling_ and function call (`random()`) is replaced with the result of the function.
+As you can see, the source code of the `random` function occurs nowhere in the bundle. Instead, it is executed _during bundling_ and function call (`random()`) is replaced with the result of the function. Since the source code will never be included in the bundle, macros can safely perform privileged operations like reading from a database.
## When to use macros
@@ -72,12 +72,6 @@ if (returnFalse()) {
}
```
-## Security
-
-Macros are only executed on your source files, not on files imported from packages in `node_modules`.
-
-The source code of a macro will never be included in the bundled; as such, macros can safely perform privileged operations like reading from a database.
-
## Serializablility
Bun's transpiler needs to be able to serialize the result of the macro so it can be inlined into the AST. All JSON-compatible data structures are supported: