aklinker1 / vite-plugin-web-extension

Vite plugin for developing Chrome/Web Extensions
https://vite-plugin-web-extension.aklinker1.io/
MIT License
653 stars 58 forks source link

feat: Implement callback that is called after parent build is completed #219

Closed alvkN closed 1 week ago

alvkN commented 2 weeks ago

I want to have some post-build actions executed as a part of serve of build process, and as I can see there is no such possibility yet (described here #218). I was unable to achieve that using both plugins (they are executed for every entrypoint group, which is not the case) and rollup hook overrides.

So, I've added onBundleReady callback to the options, which is called for every extension rebuild.

onBundleReady?: void | Promise<void>

Feedback are welcome, I am ready to improve API or something else