Is there any way to build RSCs with absolute paths to chunks? (eg. assetPrefix for RSCs contents) #69057
Unanswered
PSoltes
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Eg when we use
assetPrefixconfig in next config we get actual html generated in this kinda waybut matching
.rscfile for this same page/component only has relative paths, eg. something likeIs there a way/config/webpack plugin/whatever to make
.rsccontent chunk paths havehttps://example-asset-prefix.com/static/chunks.....format instead of these relative paths?Reasoning:
We have reverse proxied two next apps under one "entrypoint" with rewrites. With app router rsc preload requests are fired correctly and return correctly (due to rewrites), but then webpack tries to load all these chunks, it uses wrong path (I think assetPrefix of current app is used) so preloading JS via RSC of other app (making possible navigation to other app much faster) is not possible eg.
This behaviour makes sense most cases I'd guess but it would be good to be able do configure it somehow so rsc return uses absolute paths? Is it even possible?
Beta Was this translation helpful? Give feedback.
All reactions