-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removes locals.prisma #1778
removes locals.prisma #1778
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Bundle ReportChanges will increase total bundle size by 3.38kB ⬆️
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Only thought is we should define / export the prisma client in its own file under server
instead of exporting it from hooks.server
. It will still only get created once even if defined in a separate file.
What would be your strategy for doing that? Just move it out of hooks? I had it there so that it would run very first without having to have an init function for it. |
Added a PR that moves the client to its own file: #1780 |
* move prisma client to own module * add missing import
* removes locals.prisma * move prisma client to own module (#1780) * move prisma client to own module * add missing import --------- Co-authored-by: CJ <[email protected]> 2.1.93
Fixes #1755
It made no sense to have two ways to do the same thing. No need to use locals when an import will do.