unplugin-web-ext
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

unplugin-web-ext

NPM version

Simplify web extension creation with Webpack, Rollup, Vite, and esbuild.

Install

npm i unplugin-web-ext
Webpack
// webpack.config.js
const { WebExtPlugin } = require('unplugin-web-ext/webpack');

module.exports = {
  /* ... */
  plugins: [
    WebExtPlugin({
      /* options */
    }),
  ],
};


Rollup
// rollup.config.js
import { WebExtPlugin } from 'unplugin-web-ext/rollup';

export default {
  plugins: [
    WebExtPlugin({
      /* options */
    }),
  ],
};


Vite
// vite.config.ts
import { WebExtPlugin } from 'unplugin-web-ext/vite';

export default defineConfig({
  plugins: [
    WebExtPlugin({
      /* options */
    }),
  ],
});


esbuild
// esbuild.config.js
import { build } from 'esbuild';
import { WebExtPlugin } from 'unplugin-icons/esbuild';

build({
  /* ... */
  plugins: [
    WebExtPlugin({
      /* options */
    }),
  ],
});


Usage

WebExtPlugin({
  manifest: ['baseManifest.json', { name: 'my extension' }, 'genManifest.js'],
  indent: 2,
  pkgJsonProps: ['version', 'name: short_name'],
});

See type definitions for more details.

Package Sidebar

Install

npm i unplugin-web-ext

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

8.09 kB

Total Files

15

Last publish

Collaborators

  • jwr1