Rewire babel-loader loader in your create-react-app project using react-app-rewired.
Branch: master
Clone or download
Latest commit 2d7b808 Dec 24, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
src export const Dec 20, 2017
.flowconfig flow types Dec 20, 2017
LICENSE init Dec 20, 2017 Dec 24, 2017
package.json v0.1.1 Dec 20, 2017
yarn.lock deps Dec 24, 2017

react-app-rewire-babel-loader npm version

Rewire babel-loader loader in your create-react-app project using react-app-rewired.

Say there is an awesome library you found on npm that you want to use within your un-ejected create-react-app project, but unfortunately, it's published in ES6+ (since node_modules doesn't go through babel-loader), so you cannot really use it.

However, with react-app-rewired and this library, react-app-rewire-babel-loader, you can use that awesome library you've found.

See below for usage.


$ yarn add react-app-rewire-babel-loader
# npm v5+
$ npm install react-app-rewire-babel-loader
# before npm v5
$ npm install --save react-app-rewire-babel-loader


// config-overrides.js
// see:

const path = require("path");
const fs = require("fs");

const rewireBabelLoader = require("react-app-rewire-babel-loader");

// helpers

const appDirectory = fs.realpathSync(process.cwd());
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);

module.exports = function override(config, env) {

  // white-list some npm modules to the babel-loader pipeline
  // see:

  config = rewireBabelLoader.include(

  // black-list some modules from the babel-loader pipeline
  // see:

  config = rewireBabelLoader.exclude(

  return config;




  • Lint: yarn run lint
  • Prettier: yarn run pretty
  • Test: yarn run test
  • Pre-publish: yarn run prepublish
  • Build: yarn run build