Skip to content
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

Merged
merged 2 commits into from
Aug 13, 2024
Merged

removes locals.prisma #1778

merged 2 commits into from
Aug 13, 2024

Conversation

stolinski
Copy link
Collaborator

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.

Copy link

vercel bot commented Aug 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
syntax-website ✅ Ready (Inspect) Visit Preview Aug 12, 2024 8:28pm

Copy link

codecov bot commented Aug 12, 2024

Bundle Report

Changes will increase total bundle size by 3.38kB ⬆️

Bundle name Size Change
website-client-esm 2.27MB 1.3kB ⬆️
website-server-esm 30.72MB 2.08kB ⬆️

@stolinski stolinski requested a review from w3cj August 12, 2024 19:32
Copy link
Member

@w3cj w3cj left a 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.

@stolinski
Copy link
Collaborator Author

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.

@w3cj
Copy link
Member

w3cj commented Aug 12, 2024

Added a PR that moves the client to its own file: #1780

* move prisma client to own module

* add missing import
@stolinski stolinski merged commit b5a87e7 into main Aug 13, 2024
3 checks passed
@stolinski stolinski deleted the locals branch August 13, 2024 14:32
github-actions bot added a commit that referenced this pull request Aug 13, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move all locals.prisma to use prisma_client import
2 participants