{"id":21229,"library":"esbuild-jest","title":"esbuild-jest","description":"Jest transformer that uses esbuild for fast compilation of TypeScript, JavaScript, TSX, and JSX files. Current stable version is 0.5.0. Released as needed, with esbuild >=0.8.50 as peer dependency. Differentiators: significantly faster than ts-jest by leveraging esbuild's speed, but lacks type checking and some advanced TypeScript features. Ships TypeScript types.","status":"active","version":"0.5.0","language":"javascript","source_language":"en","source_url":"https://github.com/aelbore/esbuild-jest","tags":["javascript","esbuild","jest","test","typescript"],"install":[{"cmd":"npm install esbuild-jest","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-jest","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-jest","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for transformation","package":"esbuild","optional":false}],"imports":[{"note":"Default export is the transformer function. Only named exports are Options types.","symbol":"default export (transformer)","correct":"import esbuildJest from 'esbuild-jest'"},{"note":"Options is a TypeScript type, not a value. Use type import.","wrong":"import { Options } from 'esbuild-jest' (runtime error, type-only)","symbol":"Options interface","correct":"import type { Options } from 'esbuild-jest'"},{"note":"CommonJS require returns the transformer directly, not under default.","wrong":"const { default } = require('esbuild-jest')","symbol":"require with CreateTransformerOptions?","correct":"const transformer = require('esbuild-jest')"}],"quickstart":{"code":"// jest.config.js\nmodule.exports = {\n  transform: {\n    '^.+\\\\.(t|j)sx?$': ['esbuild-jest', { sourcemap: true }]\n  }\n};\n\n// your.test.ts\nimport { sum } from './sum';\ntest('adds 1 + 2 to equal 3', () => {\n  expect(sum(1, 2)).toBe(3);\n});","lang":"javascript","description":"Shows minimal Jest config using esbuild-jest transformer with sourcemap option and a basic test."},"warnings":[{"fix":"Run tsc --noEmit separately or use a type-checked alternative like ts-jest.","message":"esbuild-jest does not perform type checking, only transpilation.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Switch to @swc/jest or ts-jest.","message":"esbuild-jest is not maintained as actively as alternatives; consider @swc/jest or ts-jest for production.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Migrate to @swc/jest or ts-jest.","message":"The package is no longer actively maintained.","severity":"deprecated","affected_versions":">=0.5.0"}],"env_vars":null,"search_vec":"'0.5.0':23 '0.8.50':29 'advanc':51 'check':48 'compil':11 'current':19 'depend':32 'differenti':33 'esbuild':2,8,28,42,58 'esbuild-jest':1 'fast':10 'faster':35 'featur':53 'file':18 'javascript':14,57 'jest':3,4,39,59 'jsx':17 'lack':46 'leverag':41 'need':26 'peer':31 'releas':24 'ship':54 'signific':34 'speed':44 'stabl':20 'test':60 'transform':5 'ts':38 'ts-jest':37 'tsx':15 'type':47,56 'typescript':13,52,55,61 'use':7 'version':21","created_at":"2026-04-27T16:58:45.646923+00:00","updated_at":"2026-04-27T16:58:45.646923+00:00","problems":[{"fix":"npm install --save-dev esbuild-jest esbuild","cause":"esbuild-jest not installed or esbuild peer dependency missing.","error":"Cannot find module 'esbuild-jest' from 'jest.config.js'"},{"fix":"Use default import for transformer: import esbuildJest from 'esbuild-jest'","cause":"Using named import Options as a function.","error":"TypeError: esbuildJest is not a function"},{"fix":"Update regex to '^.+\\\\.(t|j)sx?$' in jest config","cause":"Transform regex does not match .tsx files.","error":"Jest encountered an unexpected token (tsx file)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/aelbore/esbuild-jest","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/esbuild-jest","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-18","next_check":"2026-07-26","install_tag":null}}