0.3.6 • Published 3 years ago

@alloc/esbuild-jest v0.3.6

Weekly downloads
579
License
MIT
Repository
github
Last release
3 years ago

esbuild-jest

npm Code style: Prettier Donate

Jest transformer with esbuild speed

This is a fork of esbuild-jest with the following added features:

  • Sourcemaps enabled by default
  • Strict mode enabled for modules
  • Hoisted jest.mock calls with nebu

Install

yarn add esbuild-jest@npm:@alloc/esbuild-jest esbuild -D

Setting up Jest config file

esbuild-jest transformer should be used in your Jest config file like this:

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

Setting up Jest config file with transformOptions

export interface Options {
  jsxFactory?: string
  jsxFragment?: string
  loaders?: {
    [ext: string]: Loader
  }
  target?: string
}
{
  "transform": {
    "^.+\\.tsx?$": [
      "esbuild-jest",
      {
        loaders: {
          '.spec.ts': 'tsx'
        }
      }
    ]
  }
}
0.4.0-0

3 years ago

0.3.6

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.3

3 years ago

0.3.0

3 years ago