nuxt.configThe starting point for your Nuxt app remains your nuxt.config file.
defineNuxtConfig function that provides a typed configuration schema.export default {
  // ...
}
export default defineNuxtConfig({
  // ...
})
router.extendRoutes you can migrate to the new pages:extend hook:export default {
  router: {
    extendRoutes (routes) {
      //
    },
  },
}
export default defineNuxtConfig({
  hooks: {
    'pages:extend' (routes) {
      //
    },
  },
})
router.routeNameSplitter you can achieve same result by updating route name generation logic in the new pages:extend hook:export default {
  router: {
    routeNameSplitter: '/',
  },
}
import { createResolver } from '@nuxt/kit'
export default defineNuxtConfig({
  hooks: {
    'pages:extend' (routes) {
      const routeNameSplitter = '/'
      const root = createResolver(import.meta.url).resolve('./pages')
      function updateName (routes) {
        if (!routes) {
          return
        }
        for (const route of routes) {
          const relativePath = route.file.substring(root.length + 1)
          route.name = relativePath.slice(0, -4).replace(/\/index$/, '').replace(/\//g, routeNameSplitter)
          updateName(route.children)
        }
      }
      updateName(routes)
    },
  },
})
Nuxt 3 is an ESM native framework. Although unjs/jiti provides semi compatibility when loading nuxt.config file, avoid any usage of require and module.exports in this file.
module.exports to export defaultconst lib = require('lib') to import lib from 'lib'In order to make Nuxt loading behavior more predictable, async config syntax is deprecated. Consider using Nuxt hooks for async operations.
Nuxt has built-in support for loading .env files. Avoid directly importing it from nuxt.config.
Nuxt and Nuxt Modules are now build-time-only.
buildModules into modules.  export default defineNuxtConfig({
    modules: [
-     '~/modules/my-module'
+     '~/modules/my-module/index'
    ]
  })
The static/ (for storing static assets) has been renamed to public/. You can either rename your static directory to public, or keep the name by setting dir.public in your nuxt.config.
It will be much easier to migrate your application if you use Nuxt's TypeScript integration. This does not mean you need to write your application in TypeScript, just that Nuxt will provide automatic type hints for your editor.
You can read more about Nuxt's TypeScript support in the docs.
vue-tsc with nuxt typecheck command.tsconfig.json with the following content:{
  "extends": "./.nuxt/tsconfig.json"
}
npx nuxt prepare to generate .nuxt/tsconfig.json.There are a number of changes to what is recommended Vue best practice, as well as a number of breaking changes between Vue 2 and 3.
It is recommended to read the Vue 3 migration guide and in particular the breaking changes list.
It is not currently possible to use the Vue 3 migration build with Nuxt 3.
Nuxt no longer provides a Vuex integration. Instead, the official Vue recommendation is to use pinia, which has built-in Nuxt support via a Nuxt module. Find out more about pinia here.
A simple way to provide global state management with pinia would be:
Install the @pinia/nuxt module:
yarn add pinia @pinia/nuxt
Enable the module in your nuxt configuration:
import { defineNuxtConfig } from 'nuxt/config'
export default defineNuxtConfig({
  modules: ['@pinia/nuxt'],
})
Create a store folder at the root of your application:
import { defineStore } from 'pinia'
export const useMainStore = defineStore('main', {
  state: () => ({
    counter: 0,
  }),
  actions: {
    increment () {
      // `this` is the store instance
      this.counter++
    },
  },
})
Create a plugin file to globalize your store:
import { useMainStore } from '~/store'
export default defineNuxtPlugin(({ $pinia }) => {
  return {
    provide: {
      store: useMainStore($pinia),
    },
  }
})
If you want to keep using Vuex, you can manually migrate to Vuex 4 following these steps.
Once it's done you will need to add the following plugin to your Nuxt app:
import store from '~/store'
export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(store)
})
For larger apps, this migration can entail a lot of work. If updating Vuex still creates roadblocks, you may want to use the community module: nuxt3-vuex-module, which should work out of the box.