You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be create ensurePeerDep was for .prisma/client | @prisma/client...
In some deployment contexts (e.g. with webpack), I've prebuilt the client with the correct binary, and then am copying it manually as an external into the node_modules that get packaged with my lambda.
Easy enough to switch import { PrismaClient } from '.prisma/client'
to import { PrismaClient } from '@prisma/client' on my side, but then I end up with the bloat of having the entire @prisma/client package with all of the build scripts, when all I really need is the index file that points to .prisma/client.
Another solution on your side would be if(process.env.NODE_ENV !== 'production') ensureDeps..
Really appreciate the DX around a verbose warning - hey! you can't use this if you don't have the right things... But, I'd like to see this dropped off for instance where the end user is definitely sure they have the right prisma client...
This is an awesome tool, and IMO is one of the most important pieces of the prisma echo system. Thank you!
The text was updated successfully, but these errors were encountered:
hdngr
changed the title
Require .prisma/client as dep
Require .prisma/client as dep leeds to unnecessary workarounds
Jan 21, 2021
Would really appreciate this as well. I'm bundling with @vercel/ncc and have to do some pretty wonky workarounds to get things to load with the current ensureDeps setup.
Would be create ensurePeerDep was for
.prisma/client | @prisma/client
...In some deployment contexts (e.g. with webpack), I've prebuilt the client with the correct binary, and then am copying it manually as an external into the node_modules that get packaged with my lambda.
Easy enough to switch
import { PrismaClient } from '.prisma/client'
to
import { PrismaClient } from '@prisma/client'
on my side, but then I end up with the bloat of having the entire@prisma/client
package with all of the build scripts, when all I really need is the index file that points to.prisma/client
.Another solution on your side would be
if(process.env.NODE_ENV !== 'production') ensureDeps
..Really appreciate the DX around a verbose warning - hey! you can't use this if you don't have the right things... But, I'd like to see this dropped off for instance where the end user is definitely sure they have the right prisma client...
This is an awesome tool, and IMO is one of the most important pieces of the prisma echo system. Thank you!
The text was updated successfully, but these errors were encountered: