A Jest transformer that uses esbuild for fast code transformation, supporting JavaScript, TypeScript, and JSX. Current stable version is 2.0.1. It allows passing custom esbuild transform options via Jest config, such as target, loaders, and format. Compared to alternatives like ts-jest or @swc/jest, it leverages esbuild's speed but offers less plugin ecosystem. Updated as of 2023, with peer dependency on esbuild >=0.17.4 <1.0.0.
npm install esbuild-jest-transformVerified import paths — ran on the pinned version, not inferred.
Show how to configure Jest with esbuild-jest-transform, including custom transform options.
Update esbuild to ^0.17.4 or later.
Refer to esbuild documentation for current options.
Run npx jest --clearCache after changing esbuild options.
Use transformIgnorePatterns to avoid transforming node_modules and ensure CJS compatibility.
Evaluate other Jest transforms if esbuild-jest-transform lacks needed features or updates.
npm install -D esbuild
Update esbuild to ^0.17.4 or later.
Ensure 'esbuild-jest-transform' is installed and spelled correctly in transform config.
Adjust transformIgnorePatterns to include your source files, e.g., transformIgnorePatterns: []
Refer to esbuild TransformOptions documentation for valid options.
No dependency data recorded yet.