I have a weird issue that I think has to do with source maps. Every now and then, I can see in the Terminal that drawer.css.map
gets passed as the value of the id
prop into my Page
server component, and into my generateMetadata
function.
This is accompanied by the following warning in Chrome Dev Tools:
DevTools failed to load source map: Could not load content for http://localhost:3000/users/drawer.css.map: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
I do not believe that I am the one causing this. I am not sure if it is caused by Next.js, or by Chrome.
My page file (src/app/users/[id]/page.tsx):
export async function generateMetadata(
{ params: { id } }: { params: { id: string } }
) {
// ...
}
export default async function Page(
{ params: { id } }: { params: { id: string } }
) {
// ...
}