prisma / nuxt-prisma

Prisma ORM integration for Nuxt
https://www.prisma.io/docs/orm/more/help-and-troubleshooting/help-articles/prisma-nuxt-module
32 stars 2 forks source link

Usage with a layer based architecture #16

Open Kheuval opened 4 days ago

Kheuval commented 4 days ago

Hello !

So I tried to move from the standard way of adding Prisma to a project as documented here (which works perfectly fine), to this module.

My project is structured like this :

├── ... ├── public ├── src <--- my layers folder │   ├── ... │   ├── Core │   │   ├── ... │   │   ├── nuxt.config.ts │   │   ├── prisma │   │   │   └── schema.prisma <--- my schema is located here │   │   ├── ... │   │ │   ├── ... ├── package.json └── ...

With the standard way, I just needed to specify the path to my schema in the package.json like so :

  "prisma": {
    "schema": "src/Core/prisma/schema.prisma"
  }

But now it doesn't seem to work anymore, whenever I run pnpm run dev it creates a new prisma folder at the root of the project and adds the demo schema as shown in the docs.

Is there a way to use this module with this kind of folder structure ?