Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pages/cloudflare/howtos/dev-deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ You can then connect your GitHub repository by following [the documentation](htt

In the Build settings:

- The "Build command" should be set to `npx opennextjs-cloudflare build`.
- The "Deploy command" should be set to `npx opennextjs-cloudflare deploy` (or `upload` to use gradual deployments).
- The "Build command" should be set to `npx @opennextjs/cloudflare build`.
- The "Deploy command" should be set to `npx @opennextjs/cloudflare deploy` (or `upload` to use gradual deployments).
2 changes: 1 addition & 1 deletion pages/cloudflare/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ We welcome both contributions and feedback!

The OpenNext Cloudflare adapter works by taking the Next.js build output and transforming it, so that it can run in Cloudflare Workers.

When you add [@opennextjs/cloudflare](https://www.npmjs.com/package/@opennextjs/cloudflare) as a dependency to your Next.js app, and then run `npx opennextjs-cloudflare` the adapter first builds your app by running the `build` script in your `package.json`, and then transforms the build output to a format that you can run locally using [Wrangler](https://developers.cloudflare.com/workers/wrangler/), and deploy to Cloudflare.
When you add [@opennextjs/cloudflare](https://www.npmjs.com/package/@opennextjs/cloudflare) as a dependency to your Next.js app, and then run `npx @opennextjs/cloudflare` the adapter first builds your app by running the `build` script in your `package.json`, and then transforms the build output to a format that you can run locally using [Wrangler](https://developers.cloudflare.com/workers/wrangler/), and deploy to Cloudflare.

You can view the code for `@opennextjs/cloudflare` [here](https://github.com/opennextjs/opennextjs-cloudflare/blob/main/packages/cloudflare/src) to understand what it does under the hood.

Expand Down
2 changes: 1 addition & 1 deletion pages/cloudflare/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ When deploying your Worker, `wrangler` will show both the original and compresse

If your Worker is larger than 10 MiB compressed — there might be unnecessary code ending up in your production bundle. You can visualize and understand this by running:

1. `npx opennextjs-cloudflare build` within your project's root directory
1. `npx @opennextjs/cloudflare build` within your project's root directory
2. `cd .open-next/server-functions/default` to open the directory that contains the bundled code
3. Take the file named `handler.mjs.meta.json` and use the [ESBuild Bundle Analyzer](https://esbuild.github.io/analyze/) to visualize your application's code, and understand the largest parts of your production bundle

Expand Down