-
Hi everyone. I want to specify a binary target when generating the client based on if I'm working locally or I am deploying an application. I know that i can specify it in the target in the schema.prisma file like so: generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "rhel-openssl-1.0.x"]
} But this includes both the engines when i want to deploy an application. If i use only the native value then i can work on it only locally and it won't work in the production environment, while if i include only the production binary target i can't work on the application locally. But if i include both of them they get packaged into node_modules and their sizes are quite large (40MB for each binary target). Can i specify when i run |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You can for example load the value for |
Beta Was this translation helpful? Give feedback.
You can for example load the value for
binaryTargets
from an environment variable - and then change the value in your build or deploy script. An alternative is to remove the unwanted binary from the archive you are deploying.