Based on vite-react-webext
Assuming PNPM and NodeJS are installed on your machine:
pnpm install
pnpm run build_v2
pnpm run pack
You can now find the output in extension.zip
and extension.xpi
.
pnpm dev
Then load extension in browser with the extension/
folder.
For Firefox developers, you can run the following command instead:
pnpm start:firefox
web-ext
auto reload the extension when extension/
files changed.
While Vite handles HMR automatically in the most of the case, Extensions Reloader is still recommanded for cleaner hard reloading.
To build the extension, run
pnpm build
And then pack files under extension
, you can upload extension.crx
or extension.xpi
to appropriate extension store.