Skip to content

Commit 1443de4

Browse files
committed
fixup! feedback
1 parent b57a2ca commit 1443de4

File tree

1 file changed

+8
-5
lines changed
  • src/content/docs/workers/frameworks/framework-guides

1 file changed

+8
-5
lines changed

src/content/docs/workers/frameworks/framework-guides/nextjs.mdx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ This is a simple getting started guide. For detailed documentation on how the to
3030

3131
[Next.js](https://nextjs.org/) is a [React](https://react.dev/) framework for building full stack applications.
3232

33-
Next.js uses hybrid rendering to allow different parts of the your application to be rendered either on the server or on the client. For instance, critical pages needing fast initial loads and strong SEO might be server-rendered for faster load while highly interactive sections might leverage client-side rendering for dynamic updates without requiring full page reloads.
33+
Next.js supports Server-side and Client-side rendering, as well as Partial Prerendering which lets you combine static and dynamic components in the same route.
3434

35-
Next supports Partial Prerendering to combine static and dynamic components in the same route.
35+
You can deploy your Next.js app to Cloudflare Workers using the OpenNext adaptor.
3636

3737
## Deploy a new Next.js project on Workers
3838

@@ -58,11 +58,14 @@ Next supports Partial Prerendering to combine static and dynamic components in t
5858

5959
3. **Test and preview your site with the Cloudflare adapter.**
6060

61-
The command used in the previous step uses the Next.js development server to offer a great developer experience.
62-
However your application will run on Cloudflare Workers so you want to run your integration tests and verify that your application works correctly in this environment.
63-
6461
<PackageManagers type="run" args="preview" />
6562

63+
<Detail title="What's the difference between dev and preview?">
64+
The command used in the previous step uses the Next.js development server, which runs in Node.js.
65+
However, your deployed application will run on Cloudflare Workers, which uses the `workerd` runtime. Therefore when running integration tests and previewing your application, you should use the preview command, which is more accurate to production, as it executes your application in the `workerd` runtime using `wrangler dev`.
66+
</Detail>
67+
68+
6669
4. **Deploy your project.**
6770

6871
You can deploy your project to a [`*.workers.dev` subdomain](/workers/configuration/routing/workers-dev/) or a [custom domain](/workers/configuration/routing/custom-domains/) from your local machine or any CI/CD system (including [Workers Builds](/workers/ci-cd/#workers-builds)). Use the following command to build and deploy. If you're using a CI service, be sure to update your "deploy command" accordingly.

0 commit comments

Comments
 (0)