Next.js Discord

Discord Forum

Should NextJS Static Site Generation provide all the files normally in "/public" or "/static"?

Unanswered
Weimaraner posted this in #help-forum
Open in Discord
WeimaranerOP
My team has built a middlewear that uses NextJS to generate all the pages of our Strapi site and that is working. But the rest of files needed to host the site (images, CSS, JS, etc..) are not in the output folder. I'm not clear if it should work that way and we need to run a separate process to collect those files, but I had assumed (danger!) that an SSG process would output all the files.

Thanks!

3 Replies

Using the first way with import it will definitely bundle the file with a unique immutable hash-based file name.
the second way it will not bundle