aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/nextjs.md
diff options
context:
space:
mode:
authorGravatar Dylan Conway <dylan.conway567@gmail.com> 2023-10-17 14:10:25 -0700
committerGravatar Dylan Conway <dylan.conway567@gmail.com> 2023-10-17 14:10:25 -0700
commit7458b969c5d9971e89d187b687e1924e78da427e (patch)
treeee3dbf95c728cf407bf49a27826b541e9264a8bd /docs/dev/nextjs.md
parentd4a2c29131ec154f5e4db897d4deedab2002cbc4 (diff)
parente91436e5248d947b50f90b4a7402690be8a41f39 (diff)
downloadbun-7458b969c5d9971e89d187b687e1924e78da427e.tar.gz
bun-7458b969c5d9971e89d187b687e1924e78da427e.tar.zst
bun-7458b969c5d9971e89d187b687e1924e78da427e.zip
Merge branch 'main' into postinstall_3
Diffstat (limited to 'docs/dev/nextjs.md')
-rw-r--r--docs/dev/nextjs.md33
1 files changed, 0 insertions, 33 deletions
diff --git a/docs/dev/nextjs.md b/docs/dev/nextjs.md
deleted file mode 100644
index 92849c989..000000000
--- a/docs/dev/nextjs.md
+++ /dev/null
@@ -1,33 +0,0 @@
-To create a new Next.js app with bun:
-
-```bash
-$ bun create next ./app
-$ cd app
-$ bun dev # start dev server
-```
-
-To use an existing Next.js app with bun:
-
-```bash
-$ bun add bun-framework-next
-$ echo "framework = 'next'" > bunfig.toml
-$ bun bun # bundle dependencies
-$ bun dev # start dev server
-```
-
-Many of Next.js’ features are supported, but not all.
-
-Here’s what doesn’t work yet:
-
-- `getStaticPaths`
-- same-origin `fetch` inside of `getStaticProps` or `getServerSideProps`
-- locales, zones, `assetPrefix` (workaround: change `--origin \"http://localhost:3000/assetPrefixInhere\"`)
-- `next/image` is polyfilled to a regular `<img src>` tag.
-- `proxy` and anything else in `next.config.js`
-- API routes, middleware (middleware is easier to support, though! Similar SSR API)
-- styled-jsx (technically not Next.js, but often used with it)
-- React Server Components
-
-When using Next.js, Bun automatically reads configuration from `.env.local`, `.env.development` and `.env` (in that order). `process.env.NEXT_PUBLIC_` and `process.env.NEXT_` automatically are replaced via `--define`.
-
-Currently, any time you import new dependencies from `node_modules`, you will need to re-run `bun bun --use next`. This will eventually be automatic.