Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Chrome extension build steps. Because the chrome manifest requires an actual file, you can’t rely on a dev server and hot module reloading. So I’ve hacked vites build command and watch command to constantly recompile chrome extension code as I develop it (typescript + frontend frameworks etc).

Add to the fact that you have to manually reload the unpacked chrome extension to apply your new changes, so I’ve hooked solution 1 up with a web socket server and a custom chrome extension that watches all your other extensions and talks to the web socket server to auto reload an unpacked extension anytime the build step completes

It’s a nightmare hack, but I may just be the worlds most productive chrome extension builder as a result! I’ve released 5 extensions in the last 5 months :)

About to release a big one, but it’s also probably the words most complicated chrome extension (LLM + Firebase store + Stripe + Auth + Serverless functions)



Sounds very cool. Do you have plans to open source that?


Here’s a project that does HMR and more: https://wxt.dev/


I haven’t used it but I think I was put off by the fact that updating your manifest restarts the browser

My custom workflow handles everything for me, I never need to restart the browser of anything like that


I think I should but it’s currently a private repo, here’s the current Vite plug-in:

https://www.npmjs.com/package/vite-plugin-extension-reloader

The extension is of the same name




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: