You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
That would help with building, thank you for that share.
Here are two ideas for this issue:
There is a method to use an extension reloader like mention, and have an 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/
Second, if you save scripts/html in the static directory, such as content/background scripts, it is a hassle to run 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.
The text was updated successfully, but these errors were encountered: