diff --git a/docs/2.guide/1.concepts/1.auto-imports.md b/docs/2.guide/1.concepts/1.auto-imports.md index 3b3c8f157..572ea66fc 100644 --- a/docs/2.guide/1.concepts/1.auto-imports.md +++ b/docs/2.guide/1.concepts/1.auto-imports.md @@ -140,3 +140,26 @@ export default defineNuxtConfig({ } }) ``` + +## Auto-import from third-party packages + +Nuxt also allows auto-importing from third-party packages. + +::alert +If you are using the Nuxt module for that package, it is likely that the module has already configured auto-imports for that package. +:: + +For example, you could enable the auto-import of the `useI18n` composable from the `vue-i18n` package like this: + +```ts [nuxt.config.ts] +export default defineNuxtConfig({ + imports: { + presets: [ + { + from: 'vue-i18n', + imports: ['useI18n'] + } + ] + } +}) +```