Registry / web-framework / esbuild-plugin-jsx

esbuild-plugin-jsx

JSON →
library1.0.1jsnpmunverified

esbuild-plugin-jsx v1.0.1 is a lightweight esbuild plugin that enables Vue 3 JSX/TSX support. It transpiles JSX syntax in Vue 3 single-file components using esbuild's built-in JSX transform with Vue's runtime. Unlike @vitejs/plugin-vue-jsx, this plugin is designed for standalone esbuild usage (e.g., in Rollup, Webpack, or CLI builds). It ships TypeScript declarations and has no dependencies. Release cadence is infrequent; current stable version is 1.0.1, unchanged since initial release. Key differentiator: minimal, zero-config integration for Vue 3 JSX in esbuild pipelines.

npm install esbuild-plugin-jsx
INSTALL
IMPORT
SIG · ESBUILD-PLUGIN-JSX
E
esbuild-plugin-jsx
web-frameworkjavascriptv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

vueJsx
✓ import vueJsx from 'esbuild-plugin-jsx'
✗ const vueJsx = require('esbuild-plugin-jsx')
Package uses ESM default export; CJS require() will fail unless using dynamic import().
VueJsxOptions
✓ import type { VueJsxOptions } from 'esbuild-plugin-jsx'
✗ import { VueJsxOptions } from 'esbuild-plugin-jsx'
VueJsxOptions is only exported as a TypeScript type; use type import to avoid runtime error.
default export (unnamed)
✓ import vueJsx from 'esbuild-plugin-jsx'
✗ import { vueJsx } from 'esbuild-plugin-jsx'
There is no named export; the plugin is a default function export.

Demonstrates bundling a Vue 3 TSX file with esbuild using the JSX plugin.

import { build } from 'esbuild'; import vueJsx from 'esbuild-plugin-jsx'; await build({ entryPoints: ['app.tsx'], bundle: true, outfile: 'dist/app.js', plugins: [vueJsx()], });
Debug
Known issues
gotchaRequires Vue 3 runtime to be present in the final bundle; the plugin only transpiles JSX, it does not polyfill Vue APIs.
fix
Ensure vue is installed as a dependency and included in the bundle.
affects: >=1.0.0
gotchaPlugin does not handle .vue single-file components; it only processes .jsx/.tsx files.
fix
Use a separate esbuild plugin (e.g., esbuild-vue) for .vue files.
affects: >=1.0.0
gotchaJSX transform uses esbuild's built-in 'transform' API with jsx: 'automatic' and jsxImportSource: 'vue'. Custom JSX pragma is not supported.
fix
If you need custom JSX pragma, consider forking the plugin or using @vitejs/plugin-vue-jsx.
affects: >=1.0.0
deprecatedNo breaking changes or deprecations reported yet. Package has only one version.
fix
N/A
affects: 1.0.0
Errors
Common errors & fixes
Module "esbuild-plugin-jsx" has been externalized for browser compatibility...
Using the plugin in a browser environment (e.g., bundling for browser) without proper externalization.
fix
Add 'esbuild-plugin-jsx' to external in esbuild config: external: ['esbuild-plugin-jsx']
TypeError: vueJsx is not a function
Incorrect import syntax (e.g., named import instead of default).
fix
Use default import: import vueJsx from 'esbuild-plugin-jsx'
error: No matching export in "esbuild-plugin-jsx" for import "VueJsxOptions"
Trying to import VueJsxOptions as a value instead of a type.
fix
Use import type: import type { VueJsxOptions } from 'esbuild-plugin-jsx'
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
esbuild-plugin-jsx — npm install esbuild-plugin-jsx · libregistry