# @pinia/nuxt

> Nuxt Module for pinia

Latest version **1.0.2** (published 2026-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pinia/nuxt
pnpm add @pinia/nuxt
yarn add @pinia/nuxt
bun add @pinia/nuxt
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2026-08-12 |
| First published | 2021-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 14720 |
| Author | Eduardo San Martin Morote |
| Maintainers | posva, danielroe |
| Keywords | nuxt, pinia, store, vue, vuex |

## Links

- npm: https://www.npmjs.com/package/@pinia/nuxt
- Repository: https://github.com/vuejs/pinia
- Homepage: https://pinia.vuejs.org/ssr/nuxt.html
- Issues: https://github.com/vuejs/pinia/issues
- Funding: https://github.com/sponsors/posva
- npm.io page: https://npm.io/package/@pinia/nuxt

## Dependencies (1)

- [@nuxt/kit](https://npm.io/package/@nuxt/kit.md) ^4.4.8

## Recent versions

- 1.0.2 (latest) — 2026-08-12
- 0.5.2-beta.0 (beta) — 2024-04-17
- 0.0.1 (next) — 2021-08-19
- 1.0.1 — 2026-07-16
- 1.0.0 — 2026-07-14
- 0.11.3 — 2025-11-05
- 0.11.2 — 2025-07-18
- 0.11.1 — 2025-06-04
- 0.11.0 — 2025-04-09
- 0.10.1 — 2025-02-12
- 0.10.0 — 2025-02-11
- 0.9.0 — 2024-12-04
- 0.8.0 — 2024-11-28
- 0.7.0 — 2024-11-03
- 0.6.1 — 2024-10-31
- … 41 more at https://npm.io/package/@pinia/nuxt/versions

## README

# `@pinia/nuxt`

> Nuxt module for Pinia

## Automatic Installation

Use `nuxi` to automatically add this module to your Nuxt project:

```shell
npx nuxi@latest module add pinia
```

## Manual Installation

Add dependencies to your Nuxt project:

```shell
npm i pinia @pinia/nuxt
```

Enable the `@pinia/nuxt` module in `nuxt.config.ts`:

```js
export default defineNuxtConfig({
  modules: ['@pinia/nuxt'],
})
```

## Configuring the Module

By default, this module adds `stores` folder to auto imports, in which you can organize code related to Pinia stores in one place.

> [!TIP]
> In the new directory structure introduced since Nuxt 4, this directory is `app/stores`.

You can customize this behaviour using the `pinia` property in `nuxt.config.ts`:

```js
export default defineNuxtConfig({
  modules: ['@pinia/nuxt'],
  // configure the module using `pinia` property
  pinia: {
    /**
     * Automatically add stores dirs to the auto imports. This is the same as
     * directly adding the dirs to the `imports.dirs` option. If you want to
     * also import nested stores, you can use the glob pattern `./stores/**`
     * (on Nuxt 3) or `app/stores/**` (on Nuxt 4+)
     *
     * @default ['stores']
     */
    storesDirs: [],
  },
})
```

## License

[MIT](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/@pinia/nuxt · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
