Lazy loaded component CSS doesn't contain assetPrefix #75181
Labels
Lazy Loading
Related to Next.js Lazy Loading (e.g., `next/dynamic` or `React.lazy`).
linear: next
Confirmed issue that is tracked by the Next.js team.
Module Resolution
Module resolution (CJS / ESM, module resolving).
Link to the code that reproduces this issue
https://github.com/GeorgeHulpoi/lazy-loaded-component-asset-prefix
To Reproduce
NEXT_PUBLIC_ASSET_PREFIX
(it will be ussed innext.config.ts
/assetPrefix
._next/static
to the cdn / server / whatever (I used an S3 + CloudFront for this reproduction).Load lazy
.assetPrefix
:Nonetheless, the CSS doesn't have the
assetPrefix
Current vs. Expected behavior
Within development environment, clicking on
Load lazy
will show the following:In production with the
assetPrefix
set, the CSS fails to load:Provide environment information
Which area(s) are affected? (Select all that apply)
Module Resolution, Lazy Loading
Which stage(s) are affected? (Select all that apply)
next start (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: