Ran into one issue when running the prerender script: if the homepage is prerendered, and the prerender script is run multiple times, it will cause a flickering issue on all prerendered pages.
More details:
The normal build process generates dist/browser/index.html
Prerender script reads dist/browser/index.html and uses that to generate new HTML files
If homepage is prerendered, dist/browser/index.html is overwritten, changing behavior on subsequent prerender runs
Suggested fix
Have the prerender script make a copy of dist/browser/index.html at dist/browser/original_index.html, and load that file instead of index.html if it exists
Ran into one issue when running the prerender script: if the homepage is prerendered, and the prerender script is run multiple times, it will cause a flickering issue on all prerendered pages.
More details:
dist/browser/index.html
dist/browser/index.html
and uses that to generate new HTML filesdist/browser/index.html
is overwritten, changing behavior on subsequent prerender runsSuggested fix
Have the prerender script make a copy of
dist/browser/index.html
atdist/browser/original_index.html
, and load that file instead ofindex.html
if it exists