@tsrx/bun-plugin-vue

Bun plugin for @tsrx/vue (.tsrx modules)
14,270 186
Install
npm install @tsrx/bun-plugin-vue
Latest Version:0.0.91
Vue:3
License:MIT
Last Updated:Oct 17, 2026
Links: GitHub  ·  npm
Maintainer: webeferen

@tsrx/bun-plugin-vue

Bun plugin for compiling @tsrx/vue .tsrx files.

Installation

pnpm add -D @tsrx/bun-plugin-vue

Usage

import tsrxVue from '@tsrx/bun-plugin-vue';

await Bun.build({
  entrypoints: ['./src/App.tsrx'],
  outdir: './dist',
  target: 'browser',
  plugins: [tsrxVue()],
});

The plugin compiles .tsrx modules with @tsrx/vue, runs the downstream vue-jsx-vapor transform, strips the remaining TypeScript syntax with Bun, and emits sibling-scoped <style> blocks (each styles its siblings and everything below them) as virtual CSS modules.

For bun:test, register it from a preload:

import tsrxVue from '@tsrx/bun-plugin-vue';

Bun.plugin(tsrxVue());

Options

  • vapor: options forwarded to vue-jsx-vapor.
  • runtimeImports: helper import mode ('compiler' by default, or 'direct' for standalone runtime imports).
  • platform: optional override/fallback for the compile-time platform. Normally the plugin reads tsrx.platform from Bun's selected/nearest tsconfig, including extends. An override must match tsconfig. For Bun.build, all three exact flags are defined and conflicting definitions are rejected.
  • emitCss: whether to emit virtual CSS imports (default: true).
  • include, exclude: regex filters for source files.

When using runtimeImports: 'direct', install the runtime as a direct production dependency of the package that owns the compiled modules:

pnpm add @tsrx/vue-runtime

Bun may bundle the helpers into its output, but this plugin only emits bare @tsrx/vue-runtime/* imports and does not provide the runtime package.

Related Packages

@tsrx/vue

Vue compiler built on @tsrx/core

20,454 186
@tsrx/vite-plugin-vue

Vite plugin for @tsrx/vue (.tsrx modules)

18,019 186
@tsrx/rspack-plugin-vue

Rspack plugin for @tsrx/vue

15,834 186
@tsrx/vue-runtime

Runtime helpers for TSRX Vue compiled output

2,949 186

Version History

Version Released License
0.0.91 MIT
0.0.90 MIT
0.0.89 MIT
0.0.88 MIT
0.0.87 MIT