{"id":25363,"library":"esbuild-plugin-jsx","title":"esbuild-plugin-jsx","description":"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.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/bpuns/esbuild-plugin-jsx","tags":["javascript","esbuild","jsx","tsx","vue","vue3","typescript"],"install":[{"cmd":"npm install esbuild-plugin-jsx","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-plugin-jsx","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-plugin-jsx","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package uses ESM default export; CJS require() will fail unless using dynamic import().","wrong":"const vueJsx = require('esbuild-plugin-jsx')","symbol":"vueJsx","correct":"import vueJsx from 'esbuild-plugin-jsx'"},{"note":"VueJsxOptions is only exported as a TypeScript type; use type import to avoid runtime error.","wrong":"import { VueJsxOptions } from 'esbuild-plugin-jsx'","symbol":"VueJsxOptions","correct":"import type { VueJsxOptions } from 'esbuild-plugin-jsx'"},{"note":"There is no named export; the plugin is a default function export.","wrong":"import { vueJsx } from 'esbuild-plugin-jsx'","symbol":"default export (unnamed)","correct":"import vueJsx from 'esbuild-plugin-jsx'"}],"quickstart":{"code":"import { build } from 'esbuild';\nimport vueJsx from 'esbuild-plugin-jsx';\n\nawait build({\n  entryPoints: ['app.tsx'],\n  bundle: true,\n  outfile: 'dist/app.js',\n  plugins: [vueJsx()],\n});","lang":"typescript","description":"Demonstrates bundling a Vue 3 TSX file with esbuild using the JSX plugin."},"warnings":[{"fix":"Ensure vue is installed as a dependency and included in the bundle.","message":"Requires Vue 3 runtime to be present in the final bundle; the plugin only transpiles JSX, it does not polyfill Vue APIs.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use a separate esbuild plugin (e.g., esbuild-vue) for .vue files.","message":"Plugin does not handle .vue single-file components; it only processes .jsx/.tsx files.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"If you need custom JSX pragma, consider forking the plugin or using @vitejs/plugin-vue-jsx.","message":"JSX transform uses esbuild's built-in 'transform' API with jsx: 'automatic' and jsxImportSource: 'vue'. Custom JSX pragma is not supported.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"N/A","message":"No breaking changes or deprecations reported yet. Package has only one version.","severity":"deprecated","affected_versions":"1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add 'esbuild-plugin-jsx' to external in esbuild config: external: ['esbuild-plugin-jsx']","cause":"Using the plugin in a browser environment (e.g., bundling for browser) without proper externalization.","error":"Module \"esbuild-plugin-jsx\" has been externalized for browser compatibility..."},{"fix":"Use default import: import vueJsx from 'esbuild-plugin-jsx'","cause":"Incorrect import syntax (e.g., named import instead of default).","error":"TypeError: vueJsx is not a function"},{"fix":"Use import type: import type { VueJsxOptions } from 'esbuild-plugin-jsx'","cause":"Trying to import VueJsxOptions as a value instead of a type.","error":"error: No matching export in \"esbuild-plugin-jsx\" for import \"VueJsxOptions\""}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}