-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Frontend loads admin panel bundle when next/link is included into root layout or home page #9984
Comments
Hey @Arctomachine — I have successfully reproduced this. You're right in that moving the I do think that this is a problem with Next.js though. We should open an issue there. It seems like If you are up for it, and you want to create a Next.js issue, that would be great! Otherwise I will get to it shortly. |
Sure, I can do it. But what should I put in there? I am not aware of what changes were made between betas 127 and 128 to pinpoint exact issue. The best I can do right now is to describe same thing I did here and attach same repository |
I don't think it's really anything to do with Payload. It would be best to have a minimal reproduction with the following:
I would imagine this would be enough to showcase the issue, that Does that make sense? |
Sure, I will see if I can make this reproduction work, and then will open issue there |
Turns out I cannot reproduce it with just that. My guess is using server function in /admin layout from 128 is somehow related. |
OK - good find. Do you have a repo started that I can play around with? Can you try and add a server function into the |
Basically their reproduction template with payload installed into it reproduces this issue. But it comes with all payload things like database connection and etc, no idea how to remove irrelevant parts. I can upload repository in its current state |
Describe the Bug
If next/link component is used in (frontend)/layout or (frontend)/page, admin panel bundle is loaded on / route.
Introduced in beta 128, probably by #8364
Workaround: move (payload)/layout into (payload)/admin/layout
Link to the code that reproduces this issue
https://github.com/Arctomachine/payload-127
Reproduction Steps
Which area(s) are affected? (Select all that apply)
Not sure, area: core, area: ui
Environment Info
The text was updated successfully, but these errors were encountered: