i ended up just making a normal .js file in the /public folder and using it.
the rest of the app was react based .jsx and when it build it makes a .js file that i can render in a popup using the content.js and background.js i made
i think that is the way i worked around the problem with but i'm not sure i leaved the project after some struggling with it