firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Skipping partial html files generated due to enabling ppr in Nextjs

Open chalosalvador opened this issue 1 year ago • 0 comments

Description

When partial pre-rendering (experimental: {ppr: true} is enabled in next.config.js Next.js includes dynamic pages in the prerender-manifest.json and it generates the .html files with partial html and those files are copied over by firebase to the hosting folder causing the pages to render empty or invalid html pages.

This PR add a check to skip partial html files from being copies over to the hosting folder.

Scenarios Tested

  • Enable ppr in next.config.js
  • Deploy to firebase hosting or run emulators in production mode.
  • Partial html files are skipped and the pages are SSR'd

Sample Commands

chalosalvador avatar Sep 04 '24 13:09 chalosalvador