yosevu / react-content-script

An example project to build Chrome extensions using React and TypeScript. Ideal for developers looking to create efficient and modern Chrome extensions with a focus on a clean development workflow using Vite and crxjs.
202 stars 56 forks source link

Create a popup #1

Closed abudhakeer closed 1 year ago

abudhakeer commented 2 years ago

Hey Yosevu, Thank you for creating this awesome template. It really helped me in building chrome extensions using react. Though there are multiple examples out there but i couldn't find any with content scripts. Only your example helped me with it.

But when i tried to add a popup to my extension i face some trouble. Because, in your example we consider App.js as content script. But if i use index.html as popup how can i use App.js as content script?

Basically, can you please help in sharing an example for using both popup and content script?

yosevu commented 2 years ago

Hi @abudhakeer, I'm not sure how much the build would have to change, but will try to take a look at adding a popup example too.

kasparas12 commented 1 year ago

@yosevu any chance you've played with that example? It would also be really needed for me. Thanks.

yosevu commented 1 year ago

Hello @kasparas12, I'll see if I can put together a basic example in the next couple of days.

yosevu commented 1 year ago

I updated the build to work for Chrome Extension Content Scripts and Popups @abudhakeer @kasparas12. Let me know if you run into any issues!