Open FireMakeThunder opened 2 years ago
For reloading the extension from the browser quickly this should do the trick ("A chrome extension for reloading unpacked extensions")
That would help with building, thank you for that share.
Here are two ideas for this issue:
npm run dev
like experience. Such a tool would compliment this adapter, and there is an example with React/Webpack on this website: https://smellycode.com/chrome-extension-live-reloading-with-react/build
in order to copy from static to the root of build. Is it less practical for this adapter to instead copy into build/static
, which then allows you to run a script refresh build/static
and avoid the slower Vite build process? Much faster than running build
to update your static scripts.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.
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.