https://github.com/vuejs/vue-jsx-vapor
Vapor Mode of Vue JSX
https://github.com/vuejs/vue-jsx-vapor
Last synced: about 2 months ago
JSON representation
Vapor Mode of Vue JSX
- Host: GitHub
- URL: https://github.com/vuejs/vue-jsx-vapor
- Owner: vuejs
- License: mit
- Created: 2024-01-13T11:08:07.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-29T04:26:16.000Z (2 months ago)
- Last Synced: 2025-09-29T06:15:20.892Z (2 months ago)
- Language: TypeScript
- Homepage: https://jsx-vapor.netlify.app/
- Size: 1.99 MB
- Stars: 143
- Watchers: 2
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# vue-jsx-vapor
[](https://www.npmjs.com/package/vue-jsx-vapor)
Vapor Mode of Vue JSX.
## Features
- ⚡️ High Performance: It has the same performance as Vue Vapor!
- ⚒️ Directives: Support all build-in directives of Vue.
- ✨ Macros: Support most macros of Vue, Friendly to JSX.
- 🌈 Hot Module Replacement: Support functional components or defined by defineComponent.
- 🦾 Type Safe: Provide Volar plugin support by install TS Macro (VSCode plugin).
- ⚙️ ESLint: Provide an ESLint plugin for vue-jsx-vapor to automatically format code.
## Installation
```bash
npm i vue-jsx-vapor
```
## Usage
- [📜 Documentation](https://jsx-vapor.netlify.app/)
- [🛰️ Playground](https://repl.zmjs.dev/vuejs/vue-jsx-vapor)
Vite
```ts
// vite.config.ts
import VueJsxVapor from 'vue-jsx-vapor/vite'
export default defineConfig({
plugins: [VueJsxVapor()],
})
```
Example: [`playground/`](./playground/)
Rollup
```ts
// rollup.config.js
import VueJsxVapor from 'vue-jsx-vapor/rollup'
export default {
plugins: [VueJsxVapor()],
}
```
Webpack
```ts
// webpack.config.js
module.exports = {
/* ... */
plugins: [require('vue-jsx-vapor/webpack')()],
}
```
Nuxt
```ts
// nuxt.config.js
export default defineNuxtConfig({
modules: ['vue-jsx-vapor/nuxt'],
})
```
> This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)
Vue CLI
```ts
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [require('vue-jsx-vapor/webpack')()],
},
}
```
esbuild
```ts
// esbuild.config.js
import { build } from 'esbuild'
import VueJsxVapor from 'vue-jsx-vapor/esbuild'
build({
plugins: [VueJsxVapor()],
})
```