# @crxjs/vite-plugin

> Build Chrome Extensions with this Vite plugin.

Latest version **3.0.0** (published 2026-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @crxjs/vite-plugin
pnpm add @crxjs/vite-plugin
yarn add @crxjs/vite-plugin
bun add @crxjs/vite-plugin
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2026-09-24 |
| First published | 2022-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 14 |
| Unpacked size | 149.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 4183 |
| Author | Jack and Amy Steam |
| Maintainers | jacksteamdev, flippedround, toumash |
| Keywords | rollup-plugin, vite-plugin, chrome, chrome-extension, extension, webext, webextension, browser, browser-extension |

## Links

- npm: https://www.npmjs.com/package/@crxjs/vite-plugin
- Repository: https://github.com/crxjs/chrome-extension-tools
- Homepage: https://crxjs.dev/vite-plugin
- Issues: https://github.com/crxjs/chrome-extension-tools/issues
- npm.io page: https://npm.io/package/@crxjs/vite-plugin

## Dependencies (14)

- [rxjs](https://npm.io/package/rxjs.md) 7.5.7
- [debug](https://npm.io/package/debug.md) ^4.4.3
- [jsesc](https://npm.io/package/jsesc.md) ^3.0.2
- [pathe](https://npm.io/package/pathe.md) ^2.0.1
- [rollup](https://npm.io/package/rollup.md) 2.80.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.3.5
- [acorn-walk](https://npm.io/package/acorn-walk.md) ^8.3.5
- [picocolors](https://npm.io/package/picocolors.md) ^1.1.1
- [tinyglobby](https://npm.io/package/tinyglobby.md) ^0.2.17
- [magic-string](https://npm.io/package/magic-string.md) ^0.30.12
- [es-module-lexer](https://npm.io/package/es-module-lexer.md) ^0.10.0
- [node-html-parser](https://npm.io/package/node-html-parser.md) ^7.1.0
- [convert-source-map](https://npm.io/package/convert-source-map.md) ^2.0.0
- [@webcomponents/custom-elements](https://npm.io/package/@webcomponents/custom-elements.md) ^1.5.0

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2026-09-24
- 2.0.0-beta.33 (beta) — 2025-05-11
- 2.7.1 — 2026-07-01
- 2.7.0 — 2026-06-18
- 2.6.1 — 2026-06-11
- 2.6.0 — 2026-06-11
- 2.5.0 — 2026-06-08
- 2.4.0 — 2026-03-16
- 2.3.0 — 2025-12-08
- 2.2.1 — 2025-10-24
- 2.2.0 — 2025-08-17
- 2.1.0 — 2025-08-06
- 2.0.3 — 2025-07-15
- 2.0.2 — 2025-06-17
- 2.0.1 — 2025-06-16
- … 45 more at https://npm.io/package/@crxjs/vite-plugin/versions

## README

![CRXJS](./banner-github.png)

<h1 align="center">CRXJS</h1>

<p align="center">
Modern Chrome extension development with built-in <code>HMR</code> and <code>zero-config</code> setup
</p>

<p align="center">
<a href="https://www.npmjs.com/package/@crxjs/vite-plugin">
<img src="https://img.shields.io/npm/v/@crxjs/vite-plugin?color=298cd6&amp;label=CRXJS&labelColor=f2bae4" alt="NPM version">
</a>
</p>

<h2 align="center">
<a href="https://crxjs.dev/vite-plugin">📚 Documentation</a> |
<a href="https://discord.gg/5yHKEa9v">💬 Discord </a>
</h2>


## 📦 Create CRXJS Project
```shell
npm create crxjs@latest
``` 

> [!IMPORTANT]
> `@latest` MUST NOT be omitted, otherwise `npm` may resolve to a cached and outdated version of the package.

## ✨ Features

- 🧩 **Full Vite Plugin Ecosystem** - Leverage any Vite-compatible plugins with zero extra setup  
- ⚙️ **Zero Configuration** - Start developing immediately with intelligent defaults  
- 3️⃣ **Manifest V3 Support** - Built for modern Chrome extensions with enhanced security  
- 🔥 **True Hot Module Replacement** - Instant UI updates while preserving extension state 🎈**works with content scripts**
- 📁 **Static Asset Import** - Directly reference images/fonts in your code
- 🤖 **Auto Web-Accessible Resources** - Automatic generation of `web_accessible_resources` manifest entries  

> [!NOTE]  
> Looking for MV2 support? See [`rollup-plugin`](packages/rollup-plugin/README.md)  

## 💻 Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md) for local development workflows.

## 💝 Contributors

This project exists thanks to all the people who contribute.

And thank you to all our backers! 🙏

<a href="https://github.com/crxjs/chrome-extension-tools/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=crxjs/chrome-extension-tools" />
</a>

## 🤝 Supporting

If these plugins have helped you ship your product faster, please consider
[sponsoring me](https://github.com/sponsors/jacksteamdev) on GitHub.

---
_Source: https://npm.io/package/@crxjs/vite-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
