Confused about new generated output.

Why in new Prisma output, I have to choose between importing from client and browser files, whereas with the old version, I could just import from @prisma/client. I understand the difference, just not sure why it was possible to import from a single place before, but now it's not.
2 Replies
Prisma AI Help
Prisma AI Help2mo ago
You selected to wait for the human sages. They'll share their wisdom soon. Grab some tea while you wait, or check out #ask-ai if you'd like a quick chat with the bot anyway!
Nurul
Nurul2mo ago
Previously, with the old prisma-client-js generator, all typings and client code were bundled into a single package (@prisma/client) and a single index.d.ts file. This made it possible to import everything, client, types, enums from one place, but it also led to issues like slow editor performance for large schemas and less flexibility for different JavaScript environments (Node.js, browser, edge, etc) With the new prisma-client generator, Prisma splits the generated output into multiple files: client.ts for server-side usage, browser.ts for browser environments, enums.ts for enums, and so on. This approach gives you more control and flexibility, especially for projects that need to support multiple runtimes.

Did you find this page helpful?