unplugin-combine
Unified plugin that combines other plugins into one plugin.
Last updated a year ago by sxzz .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install unplugin-combine 
SYNC missed versions from official npm registry.

unplugin-combine npm

Unit Test

Unified plugin that combines other plugins into one plugin.

Currently supports:

Install

npm i unplugin-combine

Usage

Similar to unplugin.

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
// vite.config.ts
import UnpluginFeature from './unplugin-feature'
export default {
  plugins: [
    UnpluginFeature.vite({
      /* options */
    }),
  ],
}
Rollup
// rollup.config.js
import UnpluginFeature from './unplugin-feature'
export default {
  plugins: [
    UnpluginFeature.rollup({
      /* options */
    }),
  ],
}
Webpack
// webpack.config.js
module.exports = {
  plugins: [
    require('./unplugin-feature').webpack({
      /* options */
    }),
  ],
}
Rspack
// rspack.config.js
module.exports = {
  plugins: [
    require('./unplugin-feature').rspack({
      /* options */
    }),
  ],
}
esbuild
// esbuild.config.js
import { build } from 'esbuild'
build({
  plugins: [
    require('./unplugin-feature').esbuild({
      /* options */
    }),
  ],
})

Sponsors

License

MIT License © 2022-PRESENT 三咲智子

Current Tags

  • 1.2.1                                ...           latest (a year ago)
  • 0.2.8                                ...           legacy (3 years ago)

31 Versions

  • 1.2.1                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.9.0                                ...           2 years ago
  • 0.8.1                                ...           2 years ago
  • 0.8.0                                ...           2 years ago
  • 0.7.0                                ...           3 years ago
  • 0.6.0                                ...           3 years ago
  • 0.5.3                                ...           3 years ago
  • 0.5.2                                ...           3 years ago
  • 0.5.1                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.2                                ...           3 years ago
  • 0.2.8                                ...           3 years ago
  • 0.2.7                                ...           3 years ago
  • 0.2.6                                ...           3 years ago
  • 0.2.5                                ...           3 years ago
  • 0.4.1                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.2.4                                ...           3 years ago
  • 0.2.3                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.1-beta.0                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (0)
None
Dev Dependencies (17)

Copyright 2013 - present © cnpmjs.org | Home |