mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
docs: add documentation on nuxt2
command (#23211)
This commit is contained in:
parent
f000e8b605
commit
edbc471583
@ -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.)
|
(If 'bridge' is set to false, your application will operate without any changes as before.)
|
||||||
|
|
||||||
|
@ -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.
|
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
|
### 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:
|
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
|
::alert
|
||||||
If `nitro: false`, use the `nuxt` command.
|
If `nitro: false`, use the `nuxt2` command.
|
||||||
::
|
::
|
||||||
|
|
||||||
### Static Target
|
### Static Target
|
||||||
|
Loading…
Reference in New Issue
Block a user