Provider `prisma-client` vs `prisma-client` js with preview features
I have a few questions about the client provider changes v6 -> v7
- generates a client where a single
1. If so, then why does it respect the
Specifying just
The docs mention at least the WASM file:
2. Why do we need two features and what happens without
Rest of questions in the top comment
- generates a client where a single
libquery_engine-debian-openssl-3.0.x.so.node file is found and used. According to the docs:The prisma-client-js is the default generator for Prisma ORM 6.X versions and before. It requires the @prisma/client npm package and generates Prisma Client into node_modules.
1. If so, then why does it respect the
output setting instead of generating into node_modules?As of v6.7.0
, Prisma ORM has the queryCompiler Preview feature.
When enabled, your Prisma Client will be generated without a Rust-based query engine binary:
generator client {
provider = "prisma-client-js"
previewFeatures = ["queryCompiler", "driverAdapters"]
}
Note that the driver adapters Preview feature is required alongside queryCompiler.
Specifying just
queryCompiler results in a (non-functional) client with only JS/TS files, but prisma generate gives no error. Adding "driverAdapters" results in query_compiler_bg.wasm file in the generator. But, no more target-dependent libssl.node file anymore.The docs mention at least the WASM file:
Components that cannot yet be moved are being re-packaged into a WASM file included in the @prisma/client npm module. This WASM file functions as the query compiler, simplifying workflows without significant API changes.
2. Why do we need two features and what happens without
driverAdaptersRest of questions in the top comment