From 6f1fa4bfe8cd184b3c8607e0de669c6346b4996f Mon Sep 17 00:00:00 2001 From: Adam DeHaven <2229946+adamdehaven@users.noreply.github.com> Date: Thu, 1 Aug 2024 04:44:36 -0400 Subject: [PATCH] docs: fix mdc component usage and cloudflare preset reference (#2600) --- docs/2.deploy/20.providers/cloudflare.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/2.deploy/20.providers/cloudflare.md b/docs/2.deploy/20.providers/cloudflare.md index 5d5868daed..1f5aeb5087 100644 --- a/docs/2.deploy/20.providers/cloudflare.md +++ b/docs/2.deploy/20.providers/cloudflare.md @@ -26,21 +26,21 @@ If you use the [Cloudflare Pages GitHub/GitLab integration](https://developers.c If instead you want preview your application locally and/or manually deploy it, when building the application you will need to let Nitro know that the target environment is the Cloudflare Pages one, you can do that in two ways: -1. By defining either the `NITRO_PRESET` or the `SERVER_PRESET` environment variable set to `cloudflare_pages` when running the build process, like so: +- By defining either the `NITRO_PRESET` or the `SERVER_PRESET` environment variable set to `cloudflare_pages` when running the build process, like so: - ```bash - NITRO_PRESET=cloudflare_pages npm run build - ``` + ```bash + NITRO_PRESET=cloudflare_pages npm run build + ``` -1. Or by updating your Nitro [preset configuration](/config#preset): +- Or by updating your Nitro [preset configuration](/config#preset): - ```json5 - "preset": "cloudflare_pages", - ``` + ```json5 + "preset": "cloudflare_pages", + ``` -and then running the standard build command: + and then running the standard build command: -:pm-run{script="build"} + :pm-run{script="build"} ### Wrangler @@ -120,7 +120,7 @@ npm i wrangler wrangler login ``` -Generate your app using the `cloudflare` preset: +Generate your app using the `cloudflare_module` preset: ```bash NITRO_PRESET=cloudflare_module npm run build @@ -309,6 +309,6 @@ export default defineNuxtConfig({ From this moment, when running -::pm-run{script="dev"} +:pm-run{script="dev"} you will be able to access the `MY_VARIABLE` and `MY_KV` from the request event just as illustrated above.