Skip to content

Commit b43fd26

Browse files
committed
Fix unnecessary content
1 parent 1ccc2cf commit b43fd26

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

pages/cloudflare/get-started.mdx

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ npm install --save-dev @opennextjs/cloudflare
2626
Then, add a [`wrangler.toml`](https://developers.cloudflare.com/workers/wrangler/configuration/) file to the root directory of your Next.js app:
2727

2828
```toml
29+
main = ".worker-next/index.mjs"
2930
name = "my-app"
3031
compatibility_date = "2024-09-23"
3132
compatibility_flags = ["nodejs_compat"]
32-
assets = { directory = "public"}
33+
experimental_assets = { directory = ".worker-next/assets", binding = "ASSETS" }
3334
```
3435

3536
<Callout>
@@ -38,26 +39,7 @@ As shown above, you must enable the [`nodejs_compat` compatibility flag](https:/
3839

3940
`wrangler.toml` is where you configure your Worker and define what resources it can access via [bindings](/workers/runtime-apis/bindings/).
4041

41-
##### 3. Update `next.config.mjs`
42-
43-
Next, update the content in your `next.config.mjs` file.
44-
45-
```diff title="next.config.mjs"
46-
+ import { setupDevPlatform } from '@cloudflare/next-on-pages/next-dev';
47-
48-
/** @type {import('next').NextConfig} */
49-
const nextConfig = {};
50-
51-
+ if (process.env.NODE_ENV === 'development') {
52-
+ await setupDevPlatform();
53-
+ }
54-
55-
export default nextConfig;
56-
```
57-
58-
These changes allows you to access [bindings](/pages/framework-guides/nextjs/ssr/bindings/) in local development.
59-
60-
##### 5. Update `package.json`
42+
##### 3. Update `package.json`
6143

6244
Add the following to the scripts field of your `package.json` file:
6345

@@ -73,12 +55,12 @@ Add the following to the scripts field of your `package.json` file:
7355
- `npm run preview:worker`: Runs `build:worker` and then `preview:worker`, allowing you to quickly preview your app running locally in the Workers runtime, via a single command.
7456
- `npm run deploy`: Builds your app, and then deploys it to Cloudflare
7557

76-
##### 6. Deploy to Cloudflare Workers
58+
##### 4. Deploy to Cloudflare Workers
7759

7860
Either deploy via the command line:
7961

8062
```sh
8163
npm run deploy
8264
```
8365

84-
Or [connect a Github or Gitlab repository](https://develoers.cloudflare.com/workers/ci-cd/), and Cloudflare will automatically build and deploy each pull request you merge to your production branch.
66+
Or [connect a Github or Gitlab repository](https://developers.cloudflare.com/workers/ci-cd/), and Cloudflare will automatically build and deploy each pull request you merge to your production branch.

0 commit comments

Comments
 (0)