Skip to content

Allow binaryTargets as a CLI option  #15267

@dejanvasic85

Description

@dejanvasic85

Problem

Having binaryTargets as an option only in the schema file means that we need to specify multiple targets for all our environments. e.g. Locally we are using "darwin" but we want to deploy "rhel-openssl-1.0.x" only.

At the moment, this is causing us headaches when we want to deploy Nextjs to Vercel which uses serverless environment and size is limited.

Suggested solution

CLI option:
npx prisma genearate --binaryTargets "rhel-openssl-1.0.x"

Alternatives

In a github workflow action, we are having to change the contents of the schema file before running the generate method which would remove the targets like "darwin" that we need locally.

Additional context

#12691 (comment)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions