-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
duplicated chunks in rsc (tailwind styles) #323
Comments
working on this. |
it's dev only issue, right? |
Nope, it happens in pnpm build also! |
Oh, I see. |
Oh, that's bad. That's my oversight. Right, those chunks are embedded with SSR and sent over wire with RSC. |
@dai-shi I'm just re-reading the whole source code, do you have any hint that might help? Any filename or function name. (if it's something you're handling, and not rsc itself) |
I guess it's the router/server file. |
The large chunks are probably generated with the combination of vite and react. It has nothing to do with router, I guess. (Yeah, it might be good to reproduce the behavior without waku/router and without SSR.) |
I just started doubting if there's any problem with the chunks since they are RSC and they render on the server and then the serialized result gets injected which has so many tailwind classes, I think this is fair, let me know if I'm wrong. |
So, back to my original understanding, it was working fine in PRD, but at some point, in DEV, we see duplicated chunks, sending same tailwind styles multiple times in the RSC payload (or embedded in html in SSR). Do you not observe it anymore? |
I see the tailwind chunks in PRD! But yes, it's not duplicated. In dev, only in the first run, they're duplicated; when you reload, it gets fixed. I thought this was an expected behaviour where things get cached, but I guess is wrong. I think we should change the issue's title, because the chunks and their size are not the issue, rather the duplication is. |
Yeah, I think ideally, they shouldn't be duplicated for the first load in DEV. |
I'll get back to this later! If anyone wants to take it meanwhile, don't hesitate! |
Hmmm, I'm not confident if it's dev only issue. Further investigation is appreciated. |
Another issue is if we disable JS, there's no styles (reported by @himself65 ) It can be a different issue, but I think the root cause is the same. |
dev mode or production mode? As far as I guess, this should not happen in production, but expected in dev since we support HMR that way. |
I think it's both dev and prd. |
Maybe, I'm wrong. It's dev only. Can @himself65 confirm? |
yeah, dev only. |
There is dev css flickering because it loaded later than the JSX. |
So, it's the same as the first item in #344. I'm not sure now if it's the same root cause. |
Yes, I realized this and it's not only tailwind classes, and for dev, it
only happens in the first load.
…On Mon, 8 Jan 2024, 06:23 Daishi Kato, ***@***.***> wrote:
@Aslemammad <https://github.com/Aslemammad>
I see the tailwind chunks in PRD! But yes, it's not duplicated.
This looks somewhat duplicated. It might not be tailwind chunks, but
bright ones?
image.png (view on web)
<https://github.com/dai-shi/waku/assets/490574/ff6e4c5f-fa0c-4195-a096-dface8ca2b6e>
—
Reply to this email directly, view it on GitHub
<#323 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJBMICHC3METWPOLOIUN7MLYNNNTBAVCNFSM6AAAAABBEKOY6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGMYTSMZSGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
How about PRD? |
For me, PRD was ok in that sense if I recall correctly
…On Mon, 8 Jan 2024, 11:04 Daishi Kato, ***@***.***> wrote:
How about PRD?
—
Reply to this email directly, view it on GitHub
<#323 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJBMICDKTRZAPRTINOLKAALYNOOQLAVCNFSM6AAAAABBEKOY6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGUYDEMZRGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
That's what we discussed but it feels duplicated now I see it. I'm not sure if it's reasonable. |
Yes, maybe! but as I saw last time, the result was not as scattered as the dev result was. |
Next.js team is aware of the LARGE chunks so they try to optimize RSC payload. Referencevercel/next.js#52028 |
Do we still have any issues? |
large chunks in rsc which can be a short filename instead
The text was updated successfully, but these errors were encountered: