A Jest transformer using esbuild
npm install -D @ohpz/esbuild-jest
Set transform
TypeScript file to @ohpz/esbuild-jest
inside jest.config.js
{
"transform": {
"^.+\\.tsx?$": "@ohpz/esbuild-jest"
}
}
Specify esbuild options
const esbuildOptions = {}
module.export = {
transform: {
"^.+\\.tsx?$": [
"@ohpz/esbuild-jest",
esbuildOptions
]
}
}
MIT License © 2021 hannoeru