<!DOCTYPEhtml><htmllang="en"> <head> <title>Slingshow</title> <scriptsrc="./build/popup.js"defer></script> <linkrel="stylesheet"href="./tailwind.css" /> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> <divid="root"></div> </body></html>
In popup.js
import React, { useState, useEffect } from"react";import ReactDOM from"react-dom";import browser from"webextension-polyfill";constdebug=require("debug")("app:popup");debug("Running popup");functionPopup() {return (<div> Pop pop </div>);}ReactDOM.render(<Popup />,document.getElementById("root"));
Then you need to build the popup.js using parcel/webpack which it is then built in build/popup.js
popup.js is basically like a background/service_worker script