From edbc471583c1b609526e6e84c24184bec4fc3318 Mon Sep 17 00:00:00 2001 From: Ryota Watanabe <43837308+wattanx@users.noreply.github.com> Date: Thu, 14 Sep 2023 20:56:38 +0900 Subject: [PATCH] docs: add documentation on `nuxt2` command (#23211) --- docs/6.bridge/1.overview.md | 19 ++++++++++++++++++- docs/6.bridge/8.nitro.md | 16 +++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/docs/6.bridge/1.overview.md b/docs/6.bridge/1.overview.md index 0871c4d9a0..5099aef99b 100644 --- a/docs/6.bridge/1.overview.md +++ b/docs/6.bridge/1.overview.md @@ -73,7 +73,24 @@ export default defineNuxtConfig({ }) ``` -Try running `nuxt dev` once here. You will see that the application works as before. +### Update Commands + +The `nuxt` command should now be changed to the `nuxt2` command. + +```diff +{ + "scripts": { +- "dev": "nuxt", ++ "dev": "nuxt2", +- "build": "nuxt build", ++ "build": "nuxt2 build", +- "start": "nuxt start", ++ "start": "nuxt2 start" + } +} +``` + +Try running `nuxt2` once here. You will see that the application works as before. (If 'bridge' is set to false, your application will operate without any changes as before.) diff --git a/docs/6.bridge/8.nitro.md b/docs/6.bridge/8.nitro.md index e5cb531579..e05ad7fdc2 100644 --- a/docs/6.bridge/8.nitro.md +++ b/docs/6.bridge/8.nitro.md @@ -20,6 +20,20 @@ export default defineNuxtConfig({ You will also need to update your scripts within your `package.json` to reflect the fact that Nuxt will now produce a Nitro server as build output. +### Install Nuxi + +Install `nuxi` as a development dependency: + +::code-group + +```bash [Yarn] +yarn add --dev nuxi +``` + +```bash [npm] +npm install -D nuxi +``` + ### Nuxi Nuxt 3 introduced the new Nuxt CLI command [`nuxi`](/docs/api/commands/add). Update your scripts as follows to leverage the better support from Nuxt Bridge: @@ -38,7 +52,7 @@ Nuxt 3 introduced the new Nuxt CLI command [`nuxi`](/docs/api/commands/add). Upd ``` ::alert -If `nitro: false`, use the `nuxt` command. +If `nitro: false`, use the `nuxt2` command. :: ### Static Target