Nuxt/docs/content/3.docs/3.migration/3.auto-imports.md
Daniel Roe 1a39eff502
docs: update migration guide for nuxt 3 (#3819)
Co-authored-by: Dan Pastori <dan@521dimensions.com>
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
Co-authored-by: pooya parsa <pyapar@gmail.com>
2022-03-30 19:32:30 +02:00

1.0 KiB

Auto Imports

Nuxt 3 adopts a minimal friction approach, meaning wherever possible components and composables are auto-imported.

::alert{type=info} In the rest of the migration documentation, you will notice that key Nuxt and Vue utilities do not have explicit imports. This is not a typo; Nuxt will automatically import them for you, and you should get full type hinting if you have followed the instructions to use Nuxt's TypeScript support. ::

Read more about auto imports

Migration

  1. If you have been using @nuxt/components in Nuxt 2, you can remove components: true in your nuxt.config. If you had a more complex setup, then note that the component options have changed somewhat. See the components documentation for more information.

::alert{type=info} You can look at .nuxt/types/components.d.ts and .nuxt/types/auto-imports.d.ts to see how Nuxt has resolved your components and composable auto-imports. ::