mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
18cf0ba865
Co-authored-by: Sylvain Marroufin <marroufin.sylvain@gmail.com> Co-authored-by: Pooya Parsa <pyapar@gmail.com>
45 lines
1018 B
Markdown
45 lines
1018 B
Markdown
# Commands
|
|
|
|
Nuxi is the new CLI experience for Nuxt 3
|
|
|
|
Nuxt 3 has two main commands, one to start development server and one to make production assets prepared.
|
|
|
|
Since Nuxt 3 becomes a dev dependency thanks to the new Nitro server, you only need to add two commands in your `package.json`:
|
|
|
|
```json
|
|
"scripts": {
|
|
"dev": "nuxi dev",
|
|
"build": "nuxi build",
|
|
}
|
|
```
|
|
|
|
Then, you can run each command using `npm run <command>` `yarn <command>`.
|
|
|
|
## Development Server
|
|
|
|
To start Nuxt in development mode with hot module replacement on http://localhost:3000:
|
|
|
|
::code-group
|
|
```bash[Yarn]
|
|
yarn dev
|
|
```
|
|
```bash[NPM]
|
|
npm run dev
|
|
```
|
|
::
|
|
|
|
## Building for production
|
|
|
|
To build your Nuxt application for production, run:
|
|
|
|
::code-group
|
|
```bash[Yarn]
|
|
yarn build
|
|
```
|
|
```bash[NPM]
|
|
npm run build
|
|
```
|
|
::
|
|
|
|
Nuxt will create a `.output` directory with all your application, server and dependencies ready to be deployed. Checkout the [deployment](/docs/deployment) section to learn where and how you can deploy a Nuxt application using Nitro.
|