// @flow

// Base babel config. Environment-specific customizations for storybook, jest
// and ES5 build output should go in their respective config files.

module.exports = {
  presets: [
    [
      '@babel/env',
      {
        useBuiltIns: false,
      },
    ],
    '@babel/flow',
    '@babel/react',
  ],
  plugins: [
    '@babel/plugin-proposal-class-properties',
    '@babel/plugin-proposal-object-rest-spread',
    '@babel/plugin-transform-async-to-generator',
    '@babel/plugin-proposal-nullish-coalescing-operator',
    '@babel/plugin-proposal-optional-chaining',
    ['styled-components', { fileName: false }],
  ],
};
