https://github.com/jwr1/unplugin-web-ext
Simplify web extension creation with Webpack, Rollup, Vite, and esbuild.
https://github.com/jwr1/unplugin-web-ext
esbuild plugin rollup unplugin vite web-ext webpack
Last synced: 9 months ago
JSON representation
Simplify web extension creation with Webpack, Rollup, Vite, and esbuild.
- Host: GitHub
- URL: https://github.com/jwr1/unplugin-web-ext
- Owner: jwr1
- License: mit
- Created: 2022-03-07T22:04:41.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-28T14:14:25.000Z (almost 3 years ago)
- Last Synced: 2025-04-11T19:58:41.904Z (about 1 year ago)
- Topics: esbuild, plugin, rollup, unplugin, vite, web-ext, webpack
- Language: TypeScript
- Homepage: https://npm.im/unplugin-web-ext
- Size: 7.81 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# unplugin-web-ext
[](https://www.npmjs.com/package/unplugin-web-ext)
Simplify web extension creation with Webpack, Rollup, Vite, and esbuild.
## Install
```bash
npm i unplugin-web-ext
```
Webpack
```js
// webpack.config.js
const { WebExtPlugin } = require('unplugin-web-ext/webpack');
module.exports = {
/* ... */
plugins: [
WebExtPlugin({
/* options */
}),
],
};
```
Rollup
```js
// rollup.config.js
import { WebExtPlugin } from 'unplugin-web-ext/rollup';
export default {
plugins: [
WebExtPlugin({
/* options */
}),
],
};
```
Vite
```js
// vite.config.ts
import { WebExtPlugin } from 'unplugin-web-ext/vite';
export default defineConfig({
plugins: [
WebExtPlugin({
/* options */
}),
],
});
```
esbuild
```js
// esbuild.config.js
import { build } from 'esbuild';
import { WebExtPlugin } from 'unplugin-icons/esbuild';
build({
/* ... */
plugins: [
WebExtPlugin({
/* options */
}),
],
});
```
## Usage
```js
WebExtPlugin({
manifest: ['baseManifest.json', { name: 'my extension' }, 'genManifest.js'],
indent: 2,
pkgJsonProps: ['version', 'name: short_name'],
});
```
See [type definitions](src/types.ts) for more details.