How vitejs/vite-plugin-vue works
Project type and purpose
• This is an open-source monorepo providing two Vite plugins: “@vitejs/plugin-vue” and “@vitejs/plugin-vue-jsx.”
• Its purpose is to integrate Vue Single-File Components (SFCs) and JSX support into the Vite build pipeline.
File structure
• Top-level:
– Monorepo config: pnpm-workspace.yaml, package.json, tsconfig.json, CI/workflow files under .github/workflows
– scripts/: build, release, patch utilities
– packages/: two packages (plugin-vue, plugin-vue-jsx), each with its own src/ modules, build.config.ts, package.json, tsconfig.json
– playground/: dozens of example consumer projects testing SFC handling, SSR, tailwind, JSX, etc.
• Patterns:
– Monorepo using pnpm workspaces
– Each plugin follows a build script (Rollup) to output ESM/CJS + types
– playground/ projects import the plugin and exercise its hooks
README for additional insights
• Confirms two public packages and links to their detailed READMEs
Elements
– from .vue files into parsing hook
– from plugin output back to Vite bundler
– from build scripts into NPM registry
– from CI into test runners and release scripts