1.0.0 • Published 5 years ago

@pixy-family/babel-jest v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

@pixy-family/babel-jest

Why ?

When working on monorepos with Jest and Babel, project configuration can be a little tricky.

A typical monorepo architecture is to have a babel.config.js file in the root of the monorepo. This allows to configure common Babel options once for the whole project, and to override specific options when needed directly in the packages (see Babel configuration).

To be able to use the root babel.config.js with Jest, we must configure it so it uses Babel with a custom option. The problem is that it's not yet possible to do so without using a third-party module (this could be fixed in the future thanks to this pull request).

This package provides a simple way to bypass those problems.

Dependencies

Installation

$ yarn add --dev @pixy-family/babel-jest

Usage

In your Jest configuration :

{
	"transform": {
		"^.+\\.(js|jsx|ts|tsx)$": "@pixy-family/babel-jest"
	}
}

License

MIT