跳到正文
原文
Prisma Blog·· 2025-05-23AI 评分22

Prisma ORM 为何把 Client 代码生成到项目源码目录

Where Prisma ORM Generates Client Code (and Why)

AI 导读

Prisma ORM v7 起默认生成器改为 prisma-client,Prisma Client 必须通过 output 指定生成到项目源码目录(如 src/generated/prisma),不再默认写入 node_modules。

社媒成稿工作台 · 一键复制

飞书同步推送 · 含数据/日期/出处/启发
核心数据发布日期信源出处独立开发启发
1259
Prisma ORM 为何把 Client 代码生成到项目源码目录

📊 核心数据与事实(2025-05-23):
Prisma ORM v7 起默认生成器改为 prisma-client,Prisma Client 必须通过 output 指定生成到项目源码目录(如 src/generated/prisma),不再默认写入 node_modules。
• 原文实测切片:The rust-free client produces up to 90% smaller bundles and executes queries up to 3x faster;
• 原文实测切片:In our published benchmark , a fork of the open-source drizzle-benchmarks suite, Prisma 8 reaches roughly 90% of the raw pg driver's speed, holds p95 latency around 4 ms at 6,000 to 7,000 requests/second, and keeps scaling to about 12,500…
• 原文实测切片:The client ships at about 148.5 KB gzipped, around 9x smaller than Prisma 7's, which translates directly into faster cold starts on serverless and edge.

💡 对独立开发者的启发:
1/ 供给端造工具的门槛已被 AI 和开源抹平,独立开发者真正的护城河是「找准垂直业务场景 + 做好分发」。
2/ 面对新模型或开源组件先看三件事:许可证是否商用安全、API/推理边际成本降了多少、能不能直接嵌进现有变现工作流。
3/ 别去卷通用开发者轮子,把底层新能力包装成面向具体行业人群(电商、创作者、中小商家)傻瓜式交付结果的产品。

📅 日期:2025-05-23(北京时间)
📰 信息源出处:Prisma Blog(prisma.io)
🔗 原文:https://www.prisma.io/blog/why-prisma-orm-generates-code-into-node-modules-and-why-it-ll-change
📡 归档:https://billionare.me/items/r1yz0qwp626sn884rqx3n3256
去 X 发推
每天 08:00 邮件 / 08:30 飞书准点推送一手高信噪比情报与拆解免费订阅简报

来源:Prisma Blog · prisma.io