Caching HTML with CDN

Separate bundles for modern and legacy browser is an awesome feature. But it makes caching of the HTML difficult.

How could this be achieved? Ideally with Cloudflare which I am using right now.

Until now I didn’t really need caching. But now I need to add server-side rendering of static pages. I’m afraid that this will be raising CPU a lot. Also, a CDN would help to make page load faster since nothing has to be rendered on each page request.