@esmx/rsbuild-vue

The Vue 3 preset for @esmx/rsbuild. It adds @rsbuild/plugin-vue (SFC compilation + HMR) on top of the base Rsbuild integration, and re-exports everything from @esmx/rsbuild.

Installation

npm
yarn
pnpm
bun
deno
npm install @esmx/rsbuild-vue -D

vue (>=3) is a peer dependency and must be installed in your project.

Type Exports

RsbuildVueAppOptions

interface RsbuildVueAppOptions extends RsbuildAppOptions {}

Configuration options, identical to RsbuildAppOptions. The Vue plugin is injected automatically through the config hook, applying to every build target.

Function Exports

createRsbuildVueApp

function createRsbuildVueApp(esmx: Esmx, options?: RsbuildVueAppOptions): Promise<App>

Create an Rsbuild + Vue 3 Esmx application instance.

Parameters:

  • esmx — Esmx framework instance
  • options — Rsbuild Vue application configuration options

Returns:

  • Returns a Promise that resolves to the created application instance
src/entry.node.ts
export default {
  async devApp(esmx) {
    return import('@esmx/rsbuild-vue').then((m) => m.createRsbuildVueApp(esmx));
  }
};

Re-exports

This package re-exports all members of @esmx/rsbuild (e.g. createRsbuildApp, BuildTarget, rspack), so you can import the base APIs directly from @esmx/rsbuild-vue.