Vite plugin (v4.5.1) for building web extensions with Vite, supporting all major browsers. It automatically builds inputs from manifest.json, enables HMR in dev mode, validates manifests, and integrates with frontend frameworks like React, Vue, or Svelte. Published weekly with active maintenance. Differentiators: zero-config manifest-based setup, built-in dev server launching and extension reloading, and comprehensive TypeScript types.
npm install vite-plugin-web-extensionVerified import paths — ran on the pinned version, not inferred.
Basic setup with TypeScript, specifying manifest path and browser target.
Replace 'firefox: { ... }' with 'webExtConfig: { firefox: ... }'.Run a JSON linter on manifest.json before building.
Upgrade Vite to version 5 or later.
Ensure content_scripts are defined in manifest.json, not just as separate entry points.
Use import webExtension from 'vite-plugin-web-extension' as the plugin.
Ensure manifest.json exists at the project root or provide the 'manifest' option.
Use 'import webExtension from 'vite-plugin-web-extension''.
No dependency data recorded yet.