Skip to content Skip to sidebar Skip to footer

Why Are There Multiple Script Tags After Building Nextjs?

I ran next build followed by next start. It's still rendering with many JS files at once instead of a singular entrypoint. Is there something I'm missing here? The docs make it se

Solution 1:

The files you see are NextJS code splitting into functional and framework code , you can read more about it here

https://nextjs.org/blog/next-9-2#improved-code-splitting-strategy

I see a comment about a <script file in your head, Next will leave this alone because its just a tag being printed - if you need your own outside JS file to be served by Next, place it in the public directory.

Post a Comment for "Why Are There Multiple Script Tags After Building Nextjs?"