What we want to achieve is to build linux and windows installers for our Electron app on our (Linux) build server.
After installing Wine, this basically works, except for Prisma:
i.e. Prisma relies on OS-specific binaries - thus, we must have the correct binaries available for each platform.
Prisma Query engine / Prisma Client
This part works: we set the binaryTarget to our target platforms: binaryTargets = ["windows", "debian-openssl-1.1.x"].
When we now generate the client (prisma generate), the target dir (node_modules/.prisma/client/) contains the query-engines for linux and windows: libquery_engine-debian-openssl-1.1.x.so.node, query_engine-windows.dll.node
Prisma Migration Engine
i.e. in package.json we only specify the prisma dependency and npm will only install the binaries for the current OS in node_modules/@prisma/engines/, i.e.: libquery_engine-debian-openssl-1.1.x.so.node, migration-engine-debian-openssl-1.1.x
How can we get npm to install both migration Engines (i.e. for Windows and Linux)?