Skip to content
Proyek

Tentang

✨ Mengubah SFC Vue 3 menjadi JavaScript. Mendukung Vite, esbuild, Rollup, Webpack, dan lainnya.

Pengembangan web dan aplikasi

Cara angka ini diukur

Yang dapat Anda lakukan

  • ⚡️ 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].

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
+1
dalam 15 hari
+1
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

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

Jelajahi proyek terkait

Memuat…