aboutsummaryrefslogtreecommitdiff
path: root/docs/rfcs/README.md
diff options
context:
space:
mode:
authorGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-05-30 20:48:37 -0700
committerGravatar Colin McDonnell <colinmcd94@gmail.com> 2023-05-30 20:48:37 -0700
commit84d5794477fb0f36ea293eb2f0a5811a84a71ff4 (patch)
tree490dd293c78b58b302aa1879d807f9e126438e7b /docs/rfcs/README.md
parentd3d22dc4f7303a4ac2817b4384693f42acc8849d (diff)
downloadbun-rfc/bun-bundler-api.tar.gz
bun-rfc/bun-bundler-api.tar.zst
bun-rfc/bun-bundler-api.zip
Diffstat (limited to '')
-rw-r--r--docs/rfcs/README.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/rfcs/README.md b/docs/rfcs/README.md
index 284ceaf3a..42360635c 100644
--- a/docs/rfcs/README.md
+++ b/docs/rfcs/README.md
@@ -16,3 +16,13 @@ The spec for bundler configuration object is defined in [`bun-build-config.ts`][
A class for orchestrating builds & HTTP. This class is a layer that sits on top of the `Bun.build` and `Bun.serve`, intended primarily for use by framework authors.
- `class` [`Bun.App`][./bun-app.ts]: other possible names: `Bun.Builder`, `Bun.Engine`, `Bun.Framework`
+
+High-level: an `App` consists of a set of _bundlers_ and _routers_. During build/serve, Bun will:
+
+- iterate over all routers
+- each router specifies a bundler configuration (the `build` key) and an `entrypoint`/`dir`
+ - if dir, all files in entrypoint are considered entrypoints
+- everything is bundled
+- the built results are served over HTTP
+ - each router has a route `prefix` from which its build assets are served
+ - for "mode: handler", the handler is loaded and called instead of served as a static asset