---
title: "自动导入"
description: "Nuxt 3 采用了极简无障碍的方式，意味着组件和组合式函数会在可能的地方自动导入。"
canonical_url: "https://nuxt.zhcndoc.com/docs/3.x/migration/auto-imports"
---
# 自动导入

> Nuxt 3 采用了极简无障碍的方式，意味着组件和组合式函数会在可能的地方自动导入。

::note
在迁移文档的其余部分中，您会看到关键的 Nuxt 和 Vue 工具没有显式导入。这并不是笔误；Nuxt 会自动为您导入它们，如果您已按照[说明](https://nuxt.zhcndoc.com/docs/3.x/migration/configuration#typescript)使用 Nuxt 的 TypeScript 支持，应该就能获得完整的类型提示。
::

[了解有关自动导入的更多信息](https://nuxt.zhcndoc.com/docs/3.x/guide/concepts/auto-imports)

## 迁移

1. 如果您在 Nuxt 2 中使用过 `@nuxt/components`，可以从 `nuxt.config` 中移除 `components: true`。如果您的配置更复杂，请注意组件选项已有一些变化。更多信息请参阅[组件文档](https://nuxt.zhcndoc.com/docs/3.x/directory-structure/components)。

::tip
您可以查看 `.nuxt/types/components.d.ts` 和 `.nuxt/types/imports.d.ts`，了解 Nuxt 如何解析您的组件和组合式函数的自动导入。
::


## Sitemap

See the full [sitemap](https://nuxt.zhcndoc.com/sitemap.md) for all pages.
