Closed aklinker1 closed 2 years ago
This isn't really possible to fix because web-ext
reloads whenever a bundled file changes.
Couple of possible options:
v1.2.0
Until I see a need for this to be fixed, I'm going to leave it as "wontfix"
This is fixed in V2 (#44) after re-writing the build process.
When an extension with both HTML pages and scripts is ran in watch mode, if the scripts take more than about half a second to bundle, the extension will reload twice. First because the html pages were output (and web-ext reloads on file change by default), and second because we reload after the scripts are output:
https://github.com/aklinker1/vite-plugin-web-extension/blob/58a38b4ee6cb0d25babb9fc6daf0929c65bd271d/lib/index.ts#L497
It should only reload once after everything has finished updating.