Skip to content

Commit c8dd9a2

Browse files
committed
Add instructions for the open next example
1 parent 3cc936e commit c8dd9a2

File tree

1 file changed

+43
-4
lines changed

1 file changed

+43
-4
lines changed

TODO.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ DONE:
1919
```typescript
2020
/** @type {import('next').NextConfig} */
2121
const nextConfig = {
22-
output: "standalone",
23-
experimental: {
24-
serverMinification: false,
25-
},
22+
output: "standalone",
23+
experimental: {
24+
serverMinification: false,
25+
},
2626
};
2727

2828
export default nextConfig;
@@ -70,3 +70,42 @@ DONE:
7070
```sh
7171
SKIP_NEXT_APP_BUILD=1 node /path/to/poc-next/builder/dist/index.mjs && npx wrangler dev
7272
```
73+
74+
## Open next [example app](https://github.com/sst/open-next/tree/main/example)
75+
76+
Changes:
77+
78+
- App: Patch the next.config.js
79+
- App: Update package.json
80+
81+
```text
82+
"scripts": {
83+
"dev": "next dev",
84+
...
85+
},
86+
"dependencies": {
87+
"next": "^14.2.11",
88+
"next-auth": "latest",
89+
...
90+
},
91+
"devDependencies": {
92+
"node-url": "npm:url@^0.11.4",
93+
"wrangler": "^3.77.0"
94+
...
95+
}
96+
```
97+
98+
- wrangler, update bundle.ts (based on 3.76.0)
99+
100+
```js
101+
//l 354
102+
conditions: [],
103+
platform: "node",
104+
```
105+
106+
The conditions (`export const BUILD_CONDITIONS = ["workerd", "worker", "browser"];`)
107+
would pull browser files that are not traced by nft.
108+
109+
- Build the app
110+
111+
- Use the updated wrangler `pnpm --filter wrangler start dev -c /path/to/open-next/example/wrangler.toml`

0 commit comments

Comments
 (0)