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.16.0, Prisma ORM can be used without Rust engines in production applications. Learn more here.

When enabled, your Prisma Client will be generated without a Rust-based query engine binary:

generator client {
provider = "prisma-client-js" // or "prisma-client"
output = "../src/generated/prisma"
engineType = "client" // no Rust engine
}

Note that driver adapters are required if you want to use Prisma ORM without Rust engines.

You can read about the performance and DX improvements of this change on our blog.

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