Skip to main content

Module bundlers

Overview

Module bundlers bundle JavaScript modules into a single JavaScript file. Most bundlers work by copying over the JavaScript code from a variety of source files into the target file.

Since Prisma Client is not only based on JavaScript code, but also relies on the query engine binary file to be available, you need to make sure that your bundled code has access to the binary file.

note

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. When using the queryCompiler Preview feature, the connection pool is maintained by the native JS database driver you're using.

To do so, you can use plugins that let you copy over static assets: