Option to Save Static HTML in static/
Directory
#74452
rlagudals95
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Non-Goals
Background
In traditional server environments, where serverless features like ISR or API routes are not utilized, storing SSG-generated HTML files in the .next/server/pages directory is less intuitive. Users often expect these files to be located in a directory like static/, alongside other static assets such as images and CSS.
Why this feature is needed:
Current alternatives:
Proposal
Implementation Plan:
If the option is enabled, modify the SSG build process to save static HTML files in the static/ directory instead of .next/server/pages.
HTML files for SSG pages (getStaticProps) will be stored in .next/static/.
Associated JSON data will remain in .next/server/pages to maintain compatibility with dynamic rendering features like ISR.
Provide clear documentation to explain when and why to use this feature.
Beta Was this translation helpful? Give feedback.
All reactions