antfu-collective / vitesse-webext

⚡️ WebExtension Vite Starter Template
MIT License
2.9k stars 224 forks source link

feat: shared component with context #109

Closed ManUtopiK closed 1 year ago

ManUtopiK commented 1 year ago

Description

Understanding the architecture of a web extension is hard. This pull request implements little logic that give better comprehension of different part of an extension.

Additional context

It inject the globalProperties $app in the Vue instance. I use term context to follow webext-bridge convention. A shared Vue component (used in options, popup and contentScripts pages) display the context. I also added typescript, but I haven't found a better way to not create a new file modules.d.ts. I'm not a typescript expert...

ManUtopiK commented 1 year ago

The main goal of this pull request is to improve DX. Thanks for your reviews and your feedback :)

antfu commented 1 year ago

Great, thanks!