Skip to content

unplugin/unplugin-vue2

Repository files navigation

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
// vite.config.ts
import UnpluginVue2 from "unplugin-vue2/vite";

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


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

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


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


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


Quasar
// 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
// 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

About

✨ Transform Vue 2.7+ SFC to JavaScript. Supports Vite, esbuild, Rollup and Webpack.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy