Theo's Typesafe CultTTC
Theo's Typesafe Cult4y ago
19 replies
Bennett

Prisma is in my client bundle and I don't know why

When I use Next.js' bundle analyzer, I can see that Prisma (
@prisma/client
) is in my client bundle (see screenshot).

Some information:
- Prisma v4.5.0 & Next.js v13.0.4
- I export a
prisma
variable like normal from a single file
- I use that
prisma
variable in several pages for getStaticProps & getServerSideProps, as well as in the tRPC routes
- I checked that I never import PrismaClient anywhere, besides where
prisma
is initialized
- I do import the generated types from
@prisma/client
, but these shouldn't be responsible for that.... unless there is a new bug 😅

Does anyone have an idea what to look for to find out why it is in my bundle?
image.png
Was this page helpful?