An esbuild plugin that enables the @jsxImportSource pragma for automatic JSX runtime support. Version 1.0.1 is current, but the package is marked as obsolete because esbuild natively added automatic JSX runtime support in v0.14.51. This plugin provides a workaround for older esbuild versions that do not support the pragma. It ships TypeScript types and has a peer dependency on esbuild ^0.14.38. The v1 release is ESM-only, breaking CJS usage. Key differentiator: it transforms @jsxImportSource into explicit imports for the JSX factory, allowing libraries like Emotion to work with esbuild.
npm install esbuild-plugin-jsximportsourceNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates using the plugin with esbuild to bundle a TSX file, transforming @jsxImportSource pragma.
Upgrade esbuild to >=0.14.51 and remove this plugin.
Use dynamic import() in CJS or downgrade to v0.x (e.g., 0.0.4).
Pass filter option: jsxImportSourcePlugin({ filter: /\.(js|ts|jsx|tsx)$/ })Use dynamic import: const { jsxImportSourcePlugin } = await import('esbuild-plugin-jsximportsource');Use named import: import { jsxImportSourcePlugin } from 'esbuild-plugin-jsximportsource';Run npm install esbuild-plugin-jsximportsource and ensure peer dependency esbuild ^0.14.38 is satisfied.