hannoeru / jest-esbuild

A Jest esbuild transformer
MIT License
18 stars 7 forks source link

Jest esbuild

npm version

A Jest esbuild transformer

Install

npm install -D jest-esbuild

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

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

Specify esbuild options

const esbuildOptions = {}

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

License

MIT License © 2021 hannoeru