# unplugin-combine

> Unified plugin that combines other plugins into one plugin.

Latest version **2.4.0** (published 2026-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install unplugin-combine
pnpm add unplugin-combine
yarn add unplugin-combine
bun add unplugin-combine
```

## Health

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

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.4.0 |
| Published | 2026-04-27 |
| First published | 2022-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20.19.0 |
| Dependencies | 0 |
| Unpacked size | 15.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 5 |
| Author | Kevin Deng |
| Maintainers | sxzz |

## Links

- npm: https://www.npmjs.com/package/unplugin-combine
- Repository: https://github.com/sxzz/unplugin-combine
- Homepage: https://github.com/sxzz/unplugin-combine#readme
- Issues: https://github.com/sxzz/unplugin-combine/issues
- Funding: https://github.com/sponsors/sxzz
- npm.io page: https://npm.io/package/unplugin-combine

## Recent versions

- 2.4.0 (latest) — 2026-04-27
- 0.2.8 (legacy) — 2022-10-27
- 2.3.0 — 2026-01-22
- 2.2.0 — 2025-12-25
- 2.1.3 — 2025-10-06
- 2.1.2 — 2025-08-16
- 2.1.1 — 2025-08-13
- 2.1.0 — 2025-07-29
- 2.0.0 — 2025-05-08
- 1.2.1 — 2025-03-05
- 1.2.0 — 2025-01-30
- 1.1.1 — 2025-01-18
- 1.1.0 — 2025-01-08
- 1.0.3 — 2024-09-06
- 1.0.2 — 2024-07-27
- … 24 more at https://npm.io/package/unplugin-combine/versions

## README

# unplugin-combine

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Unit Test][unit-test-src]][unit-test-href]

Unified plugin that combines other plugins into one plugin.

Currently supports:

- [Vite](https://vitejs.dev/)
- [Rollup](https://rollupjs.org/)
- [Rolldown](https://rolldown.rs/)
- [Webpack](https://webpack.js.org/)
- [Rspack](https://rspack.dev/)
- [esbuild](https://esbuild.github.io/)

## Install

```bash
npm i unplugin-combine
```

## Usage

Similar to [unplugin](https://github.com/unjs/unplugin).

```ts
import { createCombinePlugin, type OptionsPlugin } from 'unplugin-combine'

export const unplugin = createCombinePlugin((userOptions: UserOptions = {}) => {
  const plugins: OptionsPlugin[] = [plugin1, plugin2, plugin3]

  return {
    name: 'unplugin-combine-xxxx',
    plugins,
  }
})

export const vitePlugin = unplugin.vite
export const rollupPlugin = unplugin.rollup
export const rolldownPlugin = unplugin.rolldown
export const webpackPlugin = unplugin.webpack
export const rspackPlugin = unplugin.rspack
export const esbuildPlugin = unplugin.esbuild
```

### Plugin Installation

###### Vite

```ts
// vite.config.ts
import UnpluginFeature from './unplugin-feature'
export default {
  plugins: [
    UnpluginFeature.vite({
      /* options */
    }),
  ],
}
```

###### Rollup

```ts
// rollup.config.js
import UnpluginFeature from './unplugin-feature'
export default {
  plugins: [
    UnpluginFeature.rollup({
      /* options */
    }),
  ],
}
```

###### Webpack

```ts
// webpack.config.js
module.exports = {
  plugins: [
    require('./unplugin-feature').webpack({
      /* options */
    }),
  ],
}
```

###### Rspack

```ts
// rspack.config.js
module.exports = {
  plugins: [
    require('./unplugin-feature').rspack({
      /* options */
    }),
  ],
}
```

###### esbuild

```ts
// esbuild.config.js
import { build } from 'esbuild'
build({
  plugins: [
    require('./unplugin-feature').esbuild({
      /* options */
    }),
  ],
})
```

## Sponsors

<p align="center">
  <a href="https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg">
    <img src='https://cdn.jsdelivr.net/gh/sxzz/sponsors/sponsors.svg'/>
  </a>
</p>

## License

[MIT](./LICENSE) License © 2022-PRESENT [Kevin Deng](https://github.com/sxzz)

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/unplugin-combine.svg
[npm-version-href]: https://npmjs.com/package/unplugin-combine
[npm-downloads-src]: https://img.shields.io/npm/dm/unplugin-combine
[npm-downloads-href]: https://www.npmcharts.com/compare/unplugin-combine?interval=30
[unit-test-src]: https://github.com/sxzz/unplugin-combine/actions/workflows/unit-test.yml/badge.svg
[unit-test-href]: https://github.com/sxzz/unplugin-combine/actions/workflows/unit-test.yml

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