A Nuxt 3 module that provides a typed Axios instance injected into the Nuxt app context. Version 1.3.5 is the latest stable release; the package is actively maintained and released via GitHub Actions. It integrates Axios out-of-the-box, supports SSR, and offers a simple configuration via nuxt.config.ts. Unlike generic Axios wrappers, it leverages Nuxt 3's auto-import and composition API, delivering a type-safe HTTP client accessible via $axios. The module is lightweight, has no peer dependencies beyond Nuxt 3 and Axios, and is published on npm.
npm install nuxt-3-axiosNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows setup and usage: add module to Nuxt config, configure baseURL, then access typed $axios instance in components via useNuxtApp()
Use useAxios() (if provided) or configure Axios via nuxt.config.ts options only; avoid using $axios in server-side middleware
Migrate to Nuxt 3 or use @nuxtjs/axios for Nuxt 2 projects
Use a separate axios property in nuxt.config.ts or set config via useRequestHeaders at runtime
Ensure project's Axios version matches the module's peer dependency (>=1.3.0) to avoid type mismatch
Access $axios from useNuxtApp() in composition API context; avoid in options API
Ensure 'nuxt-3-axios' is added to modules array in nuxt.config.ts and useNuxtApp() is called inside <script setup> or composition functions
Use const { $axios } = useNuxtApp() to access the injected instanceCheck module is in modules array; call useNuxtApp() after onMounted or in setup with Suspense
Remove package and install @nuxtjs/axios for Nuxt 2; for Nuxt 3, reinstall latest version