🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

unplugin-vue

Package Overview
Dependencies
Maintainers
4
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unplugin-vue

Transform Vue 3 SFC to JavaScript.

6.2.0
latest
Source
npm
Version published
Weekly downloads
4.6K
-3.6%
Maintainers
4
Weekly downloads
 
Created
Source

unplugin-vue npm

Unit Test

Transform Vue 3 SFC to JavaScript.

Features

  • ⚡️ Support Vite, Webpack, Vue CLI, Rollup, esbuild and more, powered by unplugin.
  • ✨ Support <script setup> and macros.
  • 🔥 Hot module replacement (HMR) support for Vite.
  • 🔄 Sync code from @vitejs/plugin-vue periodically. Currently based on @vitejs/plugin-vue@5.2.3.

Installation

npm i -D unplugin-vue
Vite
// vite.config.ts
import Vue from 'unplugin-vue/vite'

export default defineConfig({
  plugins: [Vue()],
})


Rollup
// rollup.config.js
import Vue from 'unplugin-vue/rollup'

export default {
  plugins: [Vue()],
}


Rolldown
// rolldown.config.js
import Vue from 'unplugin-vue/rolldown'

export default {
  plugins: [Vue()],
}


esbuild
import { build } from 'esbuild'
import Vue from 'unplugin-vue/esbuild'

build({
  plugins: [Vue()],
})


Webpack
// webpack.config.js
import Vue from 'unplugin-vue/webpack'

export default {
  /* ... */
  plugins: [Vue()],
}


Rspack
// rspack.config.js
import Vue from 'unplugin-vue/rspack'

export default {
  /* ... */
  plugins: [Vue()],
}


Farm
// farm.config.ts
import Vue from 'unplugin-vue/farm'

export default {
  /* ... */
  plugins: [Vue()],
}


Limitations

⚠️ HMR is not supported for Webpack, Vue CLI, and Rspack.

Who is using

Alternatives

Thanks

  • Vite - Next generation frontend tooling. It's fast!
  • unplugin - Unified plugin system for Vite, Rollup, Webpack, and more
  • vite-plugin-vue - This project is inherited from it.

Sponsors

License

MIT License © 2022-PRESENT 三咲智子

Keywords

vue

FAQs

Package last updated on 25 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts