Nuxt/docs/content/1.getting-started/5.commands.md
Daniel Roe 875deefafc
docs: add migration guide for bridge composition api (#1669)
Co-authored-by: pooya parsa <pyapar@gmail.com>
2021-11-04 12:20:40 +01:00

1.2 KiB

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.

Since Nuxt 3 becomes a dev dependency thanks to the new Nitro server, you only need to add two commands in your package.json:

"scripts": {
  "dev": "nuxi dev",
  "build": "nuxi build",
}

Then, you can run each command using npm run <command> or yarn <command>.

Development Server

To start Nuxt in development mode with hot module replacement on http://localhost:3000:

::code-group

yarn dev
npm run dev

::

Building for production

To build your Nuxt application for production, run:

::code-group

yarn build
npm run build

::

Nuxt will create a .output directory with all your application, server and dependencies ready to be deployed. Checkout the deployment section to learn where and how you can deploy a Nuxt application using Nitro.

Upgrade Nuxt3 version

To upgrade Nuxt3 version:

npx nuxi upgrade