# jest-chain-transform

> Support for multiple transform scripts of jest

Latest version **0.0.8** (published 2024-06-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install jest-chain-transform
pnpm add jest-chain-transform
yarn add jest-chain-transform
bun add jest-chain-transform
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.8 |
| Published | 2024-06-11 |
| First published | 2021-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | anc95 |
| Maintainers | anc95 |
| Keywords | jest, jest-transform, multiple-transform, jest-chain-transform |

## Links

- npm: https://www.npmjs.com/package/jest-chain-transform
- Repository: https://github.com/anc95/jest-chain-transform
- Homepage: https://github.com/anc95/jest-chain-transform#readme
- Issues: https://github.com/anc95/jest-chain-transform/issues
- npm.io page: https://npm.io/package/jest-chain-transform

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.8 (latest) — 2024-06-11
- 0.0.7 — 2024-03-01
- 0.0.6 — 2024-02-26
- 0.0.5 — 2022-12-12
- 0.0.4 — 2021-09-08
- 0.0.4-alpha.2 — 2021-09-08
- 0.0.3 — 2021-07-04
- 0.0.2 — 2021-07-03
- 0.0.1 — 2021-07-03

## README

# jest-chain-transform
[![Node.js Package](https://github.com/anc95/jest-chain-transform/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/anc95/jest-chain-transform/actions/workflows/npm-publish.yml)
[![Node.js CI](https://github.com/anc95/jest-chain-transform/actions/workflows/node.js.yml/badge.svg)](https://github.com/anc95/jest-chain-transform/actions/workflows/node.js.yml)

`jest-chain-transform` enables jest can transform file by multiple transformers.

## install

npm
```sh
npm install jest-chain-transform -D
```

yarn
```sh
yarn add jest-chain-transform -D
```

## config
```js
// jest.config.js
module.exports = {
  transform: {
    "\\.[jt]sx?$": [
      'jest-chain-transform',
      {
        transformers: [
          'path-of-your-custom-transformer', 'ts-jest'
        ]
      }
    ]
  },
}
```

Jest will transform all files that match `\\.[jt]sx?$` by `path-of-your-custom-transformer` and `'ts-jest'` in turn.

If you need to pass extra option to transform, you can write config as follow

```js
// jest.config.js
module.exports = {
  transform: {
    "\\.[jt]sx?$": [
      'jest-chain-transform',
      {
        transformers: [
          ['path-of-your-custom-transformer', { ... }],
          ['babel-jest', { ... }]
        ]
      }
    ]
  },
}
```

## option

```ts
interface Config {
  /**
   * multiple transforms
   * @example
   * ```js
   * ['babel-jest', 'ts-jest']
   * [
   *   ['babel-jest', { }],
   *   ['ts-jest', { }]
   * ]
   * ```
   */
  transformers: string[] | [string, Record<string, any>][];
}
```

---
_Source: https://npm.io/package/jest-chain-transform · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
