18F/identity-dashboard

View on GitHub
babel.config.js

Summary

Maintainability
A
0 mins
Test Coverage
module.exports = (api) => {
  const isTestEnv = api.env('test');

  let targets;
  if (isTestEnv) {
    targets = 'current node';
  } else {
    targets = '> 1% or IE 11';
  }

  return {
    presets: [
      ['@babel/preset-env', { targets }],
    ],
    plugins: [
      ['polyfill-corejs3', { method: 'usage-global', targets }],
      ['polyfill-regenerator', { method: 'usage-global' }],
    ],
  };
};