@@ -13,7 +13,13 @@ You can use [`create-next-app`](https://nextjs.org/docs/pages/api-reference/cli/
13
13
- add the following ` devDependencies ` to the ` package.json ` :
14
14
15
15
``` bash
16
+ npm add -D wrangler@latest @opennextjs/cloudflare
17
+ # or
16
18
pnpm add -D wrangler@latest @opennextjs/cloudflare
19
+ # or
20
+ yarn add -D wrangler@latest @opennextjs/cloudflare
21
+ # or
22
+ bun add -D wrangler@latest @opennextjs/cloudflare
17
23
```
18
24
19
25
- add a ` wrangler.toml ` at the root of your project
@@ -36,6 +42,12 @@ You can enable Incremental Static Regeneration ([ISR](https://nextjs.org/docs/ap
36
42
37
43
``` bash
38
44
npx wrangler kv namespace create NEXT_CACHE_WORKERS_KV
45
+ # or
46
+ pnpm wrangler kv namespace create NEXT_CACHE_WORKERS_KV
47
+ # or
48
+ yarn wrangler kv namespace create NEXT_CACHE_WORKERS_KV
49
+ # or
50
+ bun wrangler kv namespace create NEXT_CACHE_WORKERS_KV
39
51
```
40
52
41
53
- Paste the snippet to your ` wrangler.toml ` :
@@ -60,13 +72,25 @@ Run the following commands to preview the production build of your application l
60
72
- build the app and adapt it for Cloudflare
61
73
62
74
``` bash
63
- pnpx cloudflare
75
+ npx cloudflare
76
+ # or
77
+ pnpm cloudflare
78
+ # or
79
+ yarn cloudflare
80
+ # or
81
+ bun cloudflare
64
82
```
65
83
66
84
- Preview the app in Wrangler
67
85
68
86
``` bash
87
+ npx wrangler dev
88
+ # or
69
89
pnpm wrangler dev
90
+ # or
91
+ yarn wrangler dev
92
+ # or
93
+ bun wrangler dev
70
94
```
71
95
72
96
## Deploy your app
@@ -76,9 +100,11 @@ Deploy your application to production with the following:
76
100
- build the app and adapt it for Cloudflare
77
101
78
102
``` bash
79
- pnpx cloudflare
80
- ```
81
-
82
- ``` bash
83
- pnpm wrangler deploy
103
+ npx cloudflare && npx wrangler deploy
104
+ # or
105
+ pnpm cloudflare && pnpm wrangler deploy
106
+ # or
107
+ yarn cloudflare && yarn wrangler deploy
108
+ # or
109
+ bun cloudflare && bun wrangler deploy
84
110
```
0 commit comments