Skip to content
Projetos

Sobre

✨ Transforma componentes de arquivo único (SFC) do Vue 3 em JavaScript. Compatível com Vite, esbuild, Rollup, Webpack e outras ferramentas.

Desenvolvimento web e de aplicativos

Como estes números são medidos

O que você pode fazer

  • ⚡️ 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/[email protected].

Crescimento medido de estrelas

em 24 h
0
em 7 dias
+1
em 15 dias
+1
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

unplugin-vue

npm version npm downloads 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/[email protected].

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 / tsdown
// rolldown.config.js / tsdown.config.ts
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 © 2021-PRESENT Kevin Deng

Explore projetos relacionados

Carregando…