A Jest transformer leveraging esbuild for fast TypeScript, JavaScript, TSX, and JSX compilation. Version 0.5.2 is the latest stable release; the project is a fork of esbuild-jest that resolves a critical bug where source code containing the substring "ock(" (e.g., "mock(") would cause compilation failures. It supports configurable jsxFactory, jsxFragment, sourcemap, loaders, target, and format options, and is designed as a drop-in replacement for ts-jest with significantly faster transpilation. Requires esbuild >=0.9.3 as a peer dependency. The package ships TypeScript type definitions.
npm install esbuild-jest-fixedNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures Jest with esbuild-jest-fixed transformer to compile TypeScript files, demonstrates a basic test and implementation.
Replace 'esbuild-jest' with 'esbuild-jest-fixed' in Jest configuration transform patterns
Use esbuild-jest-fixed v0.5.2+ which patches the 'ock(' issueMigrate to esbuild-jest-fixed for continued support and bug fixes
Install esbuild-jest-fixed and use 'esbuild-jest-fixed' in config
Use `import createTransformer from 'esbuild-jest-fixed'` (no braces)
Run `npm install esbuild --save-dev`