unplugin-vue2

15,032 12
Install
npm install unplugin-vue2
Latest Version:0.1.1
Vue:2
License:MIT
Last Updated:Oct 23, 2026
Links: GitHub  ·  npm
Maintainer: so1ve

unplugin-vue2

NPM version

💎 Features

  • ⚡️ Supports Vite, Webpack, Vue CLI, Rollup, esbuild and more, powered by unplugin.

📦 Installation

$ npm install unplugin-vue2 -D
$ yarn add unplugin-vue2 -D
$ pnpm add unplugin-vue2 -D

🚀 Usage

// vite.config.ts
import UnpluginVue2 from "unplugin-vue2/vite";

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

// rollup.config.js
import UnpluginVue2 from "unplugin-vue2/rollup";

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

// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require("unplugin-vue2/webpack")({/* options */}),
  ],
};

// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require("unplugin-vue2/webpack")({/* options */}),
    ],
  },
};

// quasar.conf.js [Vite]
module.exports = {
  vitePlugins: [
    ["unplugin-vue2/vite", {/* options */}],
  ],
};
// quasar.conf.js [Webpack]
const UnpluginVue2Plugin = require("unplugin-vue2/webpack");
module.exports = {
  build: {
    chainWebpack(chain) {
      chain.plugin("unplugin-vue2").use(
        UnpluginVue2Plugin({/* options */}),
      );
    },
  },
};

// esbuild.config.js
import { build } from "esbuild";

build({
  /* ... */
  plugins: [
    require("unplugin-vue2/esbuild")({
      /* options */
    }),
  ],
});

👍 Alternatives

📚 Credits

  • Vite - Next generation frontend tooling. It's fast!
  • unplugin - Unified plugin system for Vite, Rollup, Webpack, and more

🙇‍ Thanks

Thanks to Vite. This project is inherited from @vitejs/plugin-vue2@2.2.0. Thanks to unplugin-vue for this idea (porting @vitejs/plugin-vue2 to unplugin).

📝 License

MIT. Made with ❤️ by Ray

Related Packages

unplugin-image

A universal bundler plugin which imports JPG, PNG, GIF, SVG, and WebP files.

40,041 1
unplugin-config

Register global imports on demand for Vite and Webpack

33,928 28
@code-hud/hud-javascript-bundlers-plugins

Based on starter template for unplugin.

33,515
@phosphor-icons/unplugin

[!WARNING] > This plugin is extremely experimental, and is subject to change. Us...

8,436 5
@styleframe/plugin

Unplugin for Styleframe. Use it with Vite, Webpack, Astro, Nuxt, Rollup, Rspack,...

24,920 91

Version History

Version Released License
0.1.1 MIT