esbuild-solid is an ESBuild plugin (version 0.6.0, last updated May 2024) that compiles Solid JSX components using Babel under the hood. It automatically detects JSX syntax in .jsx/.tsx files, transforms them with babel-preset-solid, and integrates seamlessly into esbuild's build process. Key differentiators: zero configuration, lightweight (30 lines of code), and works with both JavaScript and TypeScript. Requires esbuild ^0.8.2 and solid-js ^0.23.
npm install esbuild-solidNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage of esbuild-solid plugin to build a Solid JSX app with esbuild, including error handling.
Ensure all files containing JSX use .jsx or .tsx extensions; the regex checks for JSX syntax but is heuristic-based.
Consider using a more recent fork or upgrading to a maintained Solid plugin that supports Solid v1+.
Import only from 'esbuild-solid' main entry; do not rely on subpath imports.
If you have a custom Babel setup, consider using a different plugin that allows configuration or ensure there is no conflict.
Install @babel/core and @babel/preset-typescript as devDependencies: npm install -D @babel/core @babel/preset-typescript
Update to latest version (>=0.6.0) or use default import: import solidPlugin from 'esbuild-solid'
Add the solidPlugin() call to the plugins array: plugins: [solidPlugin()]