diff --git a/README.md b/README.md index 5f9b120..54b0e13 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ # inject-babel-plugins-cra 🔧 Injects babel plugins into [create-react-app](https://github.com/facebook/create-react-app) without ejecting. +[![npm](https://img.shields.io/npm/v/inject-babel-plugins-cra.svg)](https://www.npmjs.com/package/inject-babel-plugins-cra) +[![CircleCI](https://img.shields.io/circleci/project/github/RedSparr0w/node-csgo-parser.svg)](https://circleci.com/gh/A-Tokyo/inject-babel-plugins-cra/edit#badges) +[![npm](https://img.shields.io/npm/l/inject-babel-plugins-cra.svg)](https://github.com/A-Tokyo/inject-babel-plugins-cra/blob/master/LICENSE) + ## Getting started ### Install the module Run `yarn add --dev inject-babel-plugins-cra`. @@ -50,6 +54,7 @@ Run `yarn add --dev inject-babel-plugins-cra`. /* The string to match against before injecting the plugins */ stringMatcher?: string, } = { + /** For older version of CRA*/ babelPresetFilePath: './node_modules/babel-preset-react-app/index.js', stringMatcher: 'const plugins = [', } diff --git a/package.json b/package.json index e160c27..44424fa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "inject-babel-plugins-cra", - "version": "0.1.0", + "version": "0.2.0", "description": "🔧 Injects babel plugins into create-react-app without ejecting.", "author": { "name": "Ahmed Tarek", diff --git a/src/index.js b/src/index.js index aaa2083..ceb5e9f 100644 --- a/src/index.js +++ b/src/index.js @@ -3,7 +3,7 @@ import fs from 'fs'; import path from 'path'; const defaultBabelPresetRAFilePath: string = - './node_modules/babel-preset-react-app/index.js'; + './node_modules/babel-preset-react-app/create.js'; const defaultBabelPresetStringMatcher: string = 'const plugins = [';