react-app-rewire-date-fns
v1.0.1
Published
Add date-fns babel plugin to create-react-app using react-app-rewired
Downloads
4
Readme
react-app-rewire-date-fns
Add date-fns babel plugin to create-react-app using react-app-rewired
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);
};