{"size": 1236, "ext": "js", "max_stars_repo_path": "config/babel/browsers.js", "max_stars_repo_name": "dgeibi/the-little-cipher", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "config/babel/browsers.js", "max_issues_repo_name": "dgeibi/the-little-cipher", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "config/babel/browsers.js", "max_forks_repo_name": "dgeibi/the-little-cipher", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.262295082, "max_line_length": 70, "alphanum_fraction": 0.4029126214}
module.exports = env => {
  const config = {
    cacheDirectory: true,
    babelrc: false,
    presets: [
      [
        '@babel/preset-env',
        {
          modules: false,
          targets:
            env === 'ssr'
              ? {
                  node: 'current',
                }
              : {
                  browsers: 'last 2 versions',
                },
        },
      ],
      '@babel/preset-stage-3',
      '@babel/preset-react',
    ],
    plugins: [
      'transform-decorators-legacy',
      [
        '@babel/plugin-proposal-class-properties',
        {
          loose: true,
        },
      ],
      [
        'import',
        env === 'ssr'
          ? {
              libraryName: 'antd',
            }
          : {
              libraryName: 'antd',
              style: 'css',
              libraryDirectory: 'es',
            },
      ],
    ],
  }

  config.plugins.push([
    'react-css-modules',
    {
      webpackHotModuleReloading: env === 'development',
      generateScopedName: require('../cssModules/generateScopedName'),
      filetypes: {
        '.css': {
          plugins: ['postcss-nesting'],
        },
      },
      removeImport: env === 'ssr',
    },
  ])
  return config
}
