Jest plugin to use esbuild for transformation
npm install esbuild-jest
!build status
``bash`
npm install --save-dev esbuild-jest esbuild
#### Setting up Jest config file
esbuild-jest transformer should be used in your Jest config file like this:
`js`
{
"transform": {
"^.+\\.tsx?$": "esbuild-jest"
}
}
#### Setting up Jest config file with transformOptions
`typescript`
export interface Options {
jsxFactory?: string
jsxFragment?: string
sourcemap?: boolean | 'inline' | 'external'
loaders?: {
[ext: string]: Loader
},
target?: string
format?: string
}
`js``
{
"transform": {
"^.+\\.tsx?$": [
"esbuild-jest",
{
sourcemap: true,
loaders: {
'.spec.ts': 'tsx'
}
}
]
}
}