Migration
Build Tooling
We use the following build tools by default:
Build Tooling
We use the following build tools by default:
For this reason, most of your previous build
configuration in nuxt.config
will now be ignored, including any custom babel configuration.
If you need to configure any of Nuxt's build tools, you can do so in your nuxt.config
, using the new top-level vite
, webpack
and postcss
keys.
In addition, Nuxt ships with TypeScript support. Find out more.
Steps
- Remove
@nuxt/typescript-build
and@nuxt/typescript-runtime
from your dependencies and modules. - Remove any unused babel dependencies from your project.
- Remove any explicit core-js dependencies.
- Migrate
require
toimport
.
Runtime Config
If you wish to reference environment variables within your Nuxt 3 app, you will need to use runtime config.
Server
In a built Nuxt 3 application, there is no runtime Nuxt dependency. That means your site will be highly performant, and ultra-slim. But it also means you can no longer hook into runtime Nuxt server hooks.