Adding React index.html to current page

I am trying to make an extension that has a lot of html, adding it dynamically is awkward.

I would like to embed a react app into the current page, overlaying it using browser.extension.getURL("menuPage/reactPage.html"); in the content script.

I thought using an iFrame would be a good way to go about it, but am getting the following error:

Security Error: Content at https://www.google.com/ may not load or link to moz-extension://...

I have also tried appending to the document directly however I get the error:

Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).

So they’re obviously not the correct way to go about it.

Is there a clean way to do this?

Thanks.