antony / sveltekit-adapter-browser-extension

Build browser extensions with Svelte (early prototype)
160 stars 19 forks source link

Live updates without running build or reloading from "browser://extensions" #5

Open FireMakeThunder opened 2 years ago

FireMakeThunder commented 2 years ago

Are you aware of or do you implement any methods that keep the extension updated, while developing, akin to how the development server works?

Asked differently: how would one test changes to things like content_scripts, background scripts and other code that uses the extension APIs, without "run build" and then reloading the extension from the browser extensions page?

Using the dev server works for everything except code that uses the browser extension API's, and for that, currently, I run build and then reload the extension from the browser's extension page, which is slow.

paolodina commented 2 years ago

For reloading the extension from the browser quickly this should do the trick ("A chrome extension for reloading unpacked extensions")

FireMakeThunder commented 2 years ago

That would help with building, thank you for that share.

Here are two ideas for this issue:

antony commented 2 years ago

This definitely sounds desirable, I've been doing it manually so far, but if anybody wants to have a go at making it more automated, that would be great.

As for static scripts - there might be a way to hook into vite so that it can do this process for you rather than relying on build, but I haven't looked into it.