babel-preset-duy
Babel preset for duy's react-starter-kit and more. Highly opinionated.
Install
Using npm:
npm install --save-dev babel-preset-duy
or using yarn:
yarn add babel-preset-duy --dev
Usage
module.exports = () => {
return {
presets: [
[
require.resolve("babel-preset-duy"),
{
outside: false, // for transform outside of the app, omit most of plugins, optimization
react: true,
wdyr: true, // turn on why-did-you-render support
// vue: false, // Not yet supported
typescript: true,
datefns: true, // turn on support for date-fns library
ramda: true, // turn on support for ramda library
},
],
],
};
};
Details
This preset includes the following presets
-
@babel/preset-react: with automatic jsx transform and support for why-did-you-render out of the box