Skip to content

Use your own Babel Jest configuration in Create React App

Notifications You must be signed in to change notification settings

jsxtools/rescript-use-babel-jest-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rescript Babel Jest

NPM Version Build Status Support Chat

Rescript Babel Jest is a Rescripts configuration that lets you use your own Babel Jest configuration in Create React App without ejecting.

Installation

Add Rescript Babel Jest to your project:

npm install rescript-use-babel-jest-config --save-dev

Next, add Rescript Babel Jest to your Rescript configuration:

// .rescriptsrc.js
module.exports = [
  ['use-babel-jest-config']
]

Usage

Use your own Babel Jest configuration:

// .babelrc
{
  "presets": ["react-app"],
  "plugins": [
    ["@babel/transform-react-jsx", {
      "pragma": "createElement",
      "pragmaFrag": "Fragment"
    }],
    ["jsx-imports", {
      "pragma": "{ createElement } from react",
      "pragmaFrag": "{ Fragment } from react"
    }],
    ["module-resolver", {
      "root": ".",
      "alias": {
        "~": "./src",
        "~components": "./src/components",
      }
    }],
    ["react-html-attrs"]
  ]
}

About

Use your own Babel Jest configuration in Create React App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published