-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Added note about new location for "stores" folder in Nuxt 4. #3047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Caution Review failedThe pull request is closed. WalkthroughDocumentation change in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
✅ Deploy Preview for pinia-official ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/docs/ssr/nuxt.md (1)
93-93
: Clarify Nuxt 4 stores placement & fix wording (packages/docs/ssr/nuxt.md: line 93)Nuxt 4 does not mandate moving a stores folder — Pinia auto‑imports from a default ./stores at the project root and supports configuring pinia.storesDirs (e.g. ./app/stores/**). Replace the “moved” implication and fix “lookup” → “look up”.
-It also automatically imports **all stores** defined within your `stores` folder (note that in Nuxt 4, this folder has been moved from the project root directory to the `app` directory). It doesn't lookup for nested stores though. You can customize this behavior by setting the `storesDirs` option: +It also automatically imports **all stores** defined within your `stores` folder. In Nuxt 4, the default `srcDir` is `app/` and `~/` (`@/`) resolves there; if you place your stores under `app/stores`, configure `pinia.storesDirs` accordingly. It doesn't look up nested stores. You can customize this behavior by setting the `storesDirs` option:Recommended example update:
// nuxt.config.ts export default defineNuxtConfig({ modules: ['@pinia/nuxt'], pinia: { // Support both root-level and app/ placement storesDirs: ['./stores/**', './app/stores/**'], }, })
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Minor documentation update noting that in Nuxt 4, the default
stores
folder has been moved to theapp
directory.Summary by CodeRabbit