Skip to content

Add date-fns babel plugin to create-react-app using react-app-rewired

Notifications You must be signed in to change notification settings

senelway/react-app-rewire-date-fns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-app-rewire-date-fns

Add date-fns babel plugin to create-react-app using react-app-rewired

npm Greenkeeper badge

Add the date-fns to create-react-app app via react-app-rewired

Installation

yarn add --dev react-app-rewire-date-fns
// or
npm install --save-dev react-app-rewire-date-fns

Usage

In the config-overrides.js you created for react-app-rewired add this code:

const rewireDatefns = require('react-app-rewire-date-fns');

/* config-overrides.js */
module.exports = function override(config, env) {
  return rewireDatefns(config, env, { ...babelPluginOptions });
}

// or

module.exports = (config, env) => {
  const rewires = compose(
    rewireDatefns,
  );
  return rewires(config, env);
};

About

Add date-fns babel plugin to create-react-app using react-app-rewired

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published