Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hannoeru/jest-esbuild

A Jest esbuild transformer
https://github.com/hannoeru/jest-esbuild

Last synced: 12 days ago
JSON representation

A Jest esbuild transformer

Awesome Lists containing this project

README

        

# Jest esbuild

[![npm version](https://badgen.net/npm/v/jest-esbuild)](https://www.npmjs.com/package/jest-esbuild)

A Jest esbuild transformer

## Install

```bash
npm install -D jest-esbuild
```

Set `transform` TypeScript file to `jest-esbuild` inside `jest.config.js`

```json5
{
"transform": {
"^.+\\.tsx?$": "jest-esbuild"
}
}
```

Specify esbuild options

```js
const esbuildOptions = {}

module.export = {
transform: {
"^.+\\.tsx?$": [
"jest-esbuild",
esbuildOptions
]
}
}
```

## License

MIT License © 2021 [hannoeru](https://github.com/hannoeru)