<commit_before>module.exports = api => {
  const isTest = api.env('test')
  const plugins = [
    [
      'prismjs',
      {
        languages: ['c', 'java', 'javascript', 'objectivec', 'swift'],
        theme: 'twilight',
        css: true,
      },
    ],
    [
      'inline-react-svg',
      {
        svgo: {
          plugins: [
            {
              removeViewBox: false,
              cleanupIDs: false,
            },
          ],
        },
      },
    ],
    [
      'babel-plugin-styled-components',
      {
        displayName: true,
        fileName: true,
      },
    ],
  ]

  if (isTest) {
    plugins.push('@babel/plugin-transform-runtime')
  }

  return {
    presets: [
      [
        '@babel/preset-env',
        {
          targets: {
            ie: '11',
            edge: '16',
            firefox: '85',
            chrome: '86',
            safari: '12',
            node: '12.16.3',
          },
          loose: false,
          shippedProposals: true,
        },
      ],
      '@babel/react',
    ],
    plugins: plugins,
    exclude: ['node_modules'],
  }
}<commit_msg>Changed babel's preset-env loose mode to true to reduce component bundle size (#948)<commit_after>module.exports = api => {
  const isTest = api.env('test')
  const plugins = [
    [
      'prismjs',
      {
        languages: ['c', 'java', 'javascript', 'objectivec', 'swift'],
        theme: 'twilight',
        css: true,
      },
    ],
    [
      'inline-react-svg',
      {
        svgo: {
          plugins: [
            {
              removeViewBox: false,
              cleanupIDs: false,
            },
          ],
        },
      },
    ],
    [
      'babel-plugin-styled-components',
      {
        displayName: true,
        fileName: true,
      },
    ],
  ]

  if (isTest) {
    plugins.push('@babel/plugin-transform-runtime')
  }

  return {
    presets: [
      [
        '@babel/preset-env',
        {
          targets: {
            ie: '11',
            edge: '16',
            firefox: '85',
            chrome: '86',
            safari: '12',
            node: '12.16.3',
          },
          loose: true,
          shippedProposals: true,
        },
      ],
      '@babel/react',
    ],
    plugins: plugins,
    exclude: ['node_modules'],
  }
}
{'fraction_non_alphanumeric': 0.15152838427947599, 'fraction_numerical': 0.014410480349344978, 'mean_word_length': 1.2285992217898833, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3658194', 'n_tokens_mistral': 746, 'n_tokens_neox': 722, 'n_words': 128}