Dynamic PWA Manifest

Recently I saw an interesting stack overflow question that asks about changing the PWA icon dynamically based on the page url. Some of the comments are pointing in the right direction (serve the manifest dynamically) which increased my curiosity. HereĀ  is a sample APP I created just to try it...