Skip to content

Stores from layers are not auto-imported in main appΒ #3028

@rijkvanzanten

Description

@rijkvanzanten

Reproduction

https://github.com/rijkvanzanten/nuxt-pinia-reproduction-3028

Steps to reproduce the bug

  • Clone the repo
  • Install dependencies with pnpm install
  • Open the codebase in VS Code or other IDE
  • Open app/app.vue and observe the problem

Alternatively, run the dev server pnpm dev and open localhost:3000 to observe 500 useLayerStore is not defined.

Expected behavior

I expected useLayerStore to be available in app.vue as well.

Actual behavior

When running pnpm dev, or opening the codebase in VS Code, notice how useExampleStore is available globally (as it's defined in the main app folder), but note how useLayerStore which should be auto imported from the layer cannot be found.

Additional information

I wasn't able to use the minimal reproduction template GitHub repo, as it doesn't use Nuxt. Also not entirely sure if this is a Nuxt bug or a Pinia bug.. so let me know if we should move this elsewhere :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions