5 ms·
At the end of your SPA build process, you spin up a dummy HTTP server and run headless chromium on it (e.g. with puppeteer) to render each route and save the ou
by trinovantes 5y ago
At the end of your SPA build process, you spin up a dummy HTTP server and run headless chromium on it (e.g. with puppeteer) to render each route and save the output html.
Instead of only /dist/index.html, you have /dist/index.html, /dist/about/index.html etc.
- sbazerque 5y agoThis seems... convoluted.
- Tade0 5y agoWe, the people doing front-end, like to keep things exiting.
- arcturus17 5y agoSurely you meant this facetiously?
- sbazerque 5y agoI think not, what he describes is really the way some of these tools work.
- arcturus17 5y agoWhy render headless and repackage the output though?
- trinovantes 5y agoThe main benefit is for SEO tags on each individual route and proper 404 status code