Ok. So getting RequireJS working when working with actual webpages was a bit finnicky. But I guess this is a good proof of concept (many thanks to https://github.com/nonowarn/content-script-with-requirejs/)