Hello! I setup a barebones app with Prisma on D1. I added prisma, @prisma/adapter-d1, and @prisma/client as dependencies. I'm importing and constructing following the instructions:
import { PrismaD1 } from "@prisma/adapter-d1";
import { PrismaClient } from "@prisma/client";
export async function addEmail(email: string, env: Env): Promise<number> {
const adapter = new PrismaD1(env.DB);
const prisma = new PrismaClient({ adapter });
However: My app now fails to deploy because the bundle is too big (beyond 1MB). Cloudflare helped me debug that the majority of this is coming from "query_engine_bg", which appears to be Prisma. My total deployment is now 4.2 MB, which is beyond the 1MB allowed on free plans.
Is it possible to use Prisma on a free plan with under 1 MB of JS, or is it just too big and I should go find something else?