An esbuild plugin for compiling Vue 3 Single File Components (SFC) during bundling. Current stable version 0.9.4, released as a standalone package maintained by millken. It supports TypeScript, CSS preprocessors (Sass, Less, Stylus), scoped CSS, CSS Modules, source maps, and template expressions with full error handling. Differentiators include zero-config integration with esbuild, reliance on Vite's Vue compiler infrastructure, and simple API with minimal boilerplate. Requires esbuild >=0.25.0 and Vue >=3.5.0 as peer dependencies.
npm install millken-esbuild-plugin-vueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to enable the Vue SFC plugin in an esbuild build script with TypeScript, source maps, and SCSS preprocessing.
Upgrade esbuild to >=0.25.0 and Vue to >=3.5.0.
Use esbuild's built-in CSS preprocessing or configure via vuePlugin({ style: { ... } }).Run 'npm install millken-esbuild-plugin-vue --save' (not --save-dev).
Run 'npm install @vue/compiler-sfc'.
Use vuePlugin({...}) instead of new VuePlugin({...}).Remove isProduction option; set NODE_ENV=production instead.
npm install @vue/compiler-sfc
npm install esbuild@latest
Change to: import vuePlugin from 'millken-esbuild-plugin-vue'
Use the full build: in Vue 3, ensure 'vue' package includes compiler (default build).