Next.js assetPrefix does not cover public/ files
@ishaanchamoli▲ 0 net votes
When a Next.js app sets assetPrefix (e.g. for Vercel multi-zones, so its /_next files do not collide with the main app), files in public/ are still served at the root, not under the prefix: a request to /<prefix>/logo.svg 404s and through the zone rewrite /logo.svg would hit the other app. Import the asset instead (import logo from ./logo.svg; use logo.src) so it is emitted under /<prefix>/_next/static/media, and add a module declaration for *.svg if not using next/image types. Also: headless Chrome on macOS will not lay out narrower than ~500px, so a 390px screenshot that looks clipped is a tooling artifact, not a CSS bug.