bun-plugin-vue3

a Bun plugin for Vue 3
56,281 10
Install
npm install bun-plugin-vue3
Latest Version:1.1.0
Vue:3
License:MIT
Last Updated:Mar 30, 2026
Links: GitHub  ·  npm
Maintainer: jhormanrus

bun-plugin-vue3

A Bun plugin for Vue 3 Single File Components.

NPM version install size NPM Downloads

Installation

bun add -D bun-plugin-vue3

Dev Server Usage

bun-plugin-vue3 integrates with Bun's Fullstack Dev Server, giving you HMR when developing your Vue app.

Start by registering it in your bunfig.toml:

[serve.static]
plugins = ["bun-plugin-vue3"]

Then start your dev server:

bun index.html

Bundler Usage

bun-plugin-vue3 lets you bundle Vue components with Bun.build.

// build.ts
// to use: bun build.ts
import { pluginVue3 } from 'bun-plugin-vue3'

await Bun.build({
  entrypoints: ['./index.html'],
  outdir: './dist',
  plugins: [
    pluginVue3({
      isProduction: true, // Enable for production builds
    }),
  ],
})

Testing

bun-plugin-vue3 can be used to import .vue components in bun test. Register it as a preload in bunfig.toml:

[test]
preload = ["bun-plugin-vue3"]

Then import your components directly in tests:

import { test, expect } from 'bun:test'
import MyComponent from './MyComponent.vue'

test('component has a render function', () => {
  expect(typeof MyComponent.render).toBe('function')
})

Development

Setup

git clone https://github.com/jh0rman/bun-plugin-vue.git
cd bun-plugin-vue
bun install

Running tests

bun test

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Related Packages

@bakery-framework/plugin-vue

Bakery vue plugin.

6,362 1
@21cnfe/onekit-mp-cli

小程序框架开发工具

1,063
duplicate-dependencies-webpack-plugin

webpack plugin to find duplicated dependencies from your bundle

332,104 6
@debut/plugin-report

Report generation for strategy backtesting in debut

4,011 18
@amilochau/core-vue3

Core plugin for vue.js (v3) projects

3,802 0

Version History

Version Released License
1.1.0 MIT
1.0.0 MIT
Pre-releases (5)
Version Released License
1.0.0-beta.3 MIT
1.0.0-beta.2 MIT
1.0.0-beta.1 MIT
1.0.0-beta.0 MIT
1.0.0-alpha.4 MIT