Next.js Discord

Discord Forum

How to insert dynamic scripts and stylesheets when using App Router?

Answered
Australian Freshwater Crocodile posted this in #help-forum
Open in Discord
Australian Freshwater CrocodileOP
I have a couple of dynamic scripts and stylesheets that are coming from the API and I want to insert both in the head and body elements but I can't find how to do it. It seems that they are not supported — https://nextjs.org/docs/app/api-reference/functions/generate-metadata#unsupported-metadata but how can they not be supported since it's the most basic functionality that can ever exist? Is it something that can be shipped in the version 14.2? Or maybe there are some workarounds?

1 Reply