@tsrx/rspack-plugin-vue

Rspack plugin for @tsrx/vue
15,834 186
Install
npm install @tsrx/rspack-plugin-vue
Latest Version:0.0.99
Vue:3
License:MIT
Last Updated:Oct 17, 2026
Links: GitHub  ·  npm
Maintainer: webeferen

@tsrx/rspack-plugin-vue

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

Installation

pnpm add @tsrx/vue vue vue-jsx-vapor
pnpm add -D @tsrx/rspack-plugin-vue

Usage

import { TsrxVueRspackPlugin } from '@tsrx/rspack-plugin-vue';

export default {
  plugins: [new TsrxVueRspackPlugin()],
};

The plugin compiles .tsrx modules with @tsrx/vue, runs the result through vue-jsx-vapor, strips the remaining TypeScript syntax with builtin:swc-loader, and emits sibling-scoped <style> blocks (each styles its siblings and everything below them) through Rspack's built-in CSS module type.

It also pushes .tsrx into resolve.extensions and enables experiments.css when unset. Editor typechecking should set jsxImportSource: 'vue-jsx-vapor'.

Options

  • vapor: options forwarded to vue-jsx-vapor. By default the plugin enables macros and uses runtimeModuleName: '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 the project tsconfig (including resolve.tsConfig and extends). An override must match tsconfig. The plugin defines all three exact flags and rejects conflicting Rspack definitions.

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

The 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/bun-plugin-vue

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

14,270 186
@tsrx/vue-runtime

Runtime helpers for TSRX Vue compiled output

2,949 186

Version History

Version Released License
0.0.99 MIT
0.0.98 MIT
0.0.97 MIT
0.0.96 MIT
0.0.95 MIT