hunk.code_window:     "babel-plugin-external-helpers": "^6.22.0",
       "babel-plugin-transform-class-properties": "^6.24.1",
       "babel-plugin-transform-object-rest-spread": "^6.26.0",
       "babel-plugin-transform-react-remove-prop-types": "^0.4.8",
       "babel-preset-env": "^1.6.1",
       "babel-preset-react": "^6.24.1",
       "chroma-js": "^1.3.6",
       "chrono-node": "^1.3.5",
       "copy-webpack-plugin": "^4.3.1",
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.file_path: package.json
hunk.type: replace
file: // @flow
  
  import babel from 'rollup-plugin-babel';
  import commonjs from 'rollup-plugin-commonjs';
  import resolve from 'rollup-plugin-node-resolve';
  import uglify from 'rollup-plugin-uglify';
  import { minify } from 'uglify-es';
  
  const name = 'Select';
  const path = 'dist/react-select';
  const globals = {
    classnames: 'classNames',
    glam: 'glam',
    'prop-types': 'PropTypes',
    'react-dom': 'ReactDOM',
    'react-input-autosize': 'AutosizeInput',
    react: 'React',
  };
  const external = Object.keys(globals);
  const babelOptions = prod => {
    let result = {
      babelrc: false,
      externalHelpers: true,
      presets: [['env', { modules: false }], 'react'],
      plugins: [
        'transform-class-properties',
        'transform-object-rest-spread',
        'external-helpers',
      ],
    };
    if (prod) {
      result.plugins.push('transform-react-remove-prop-types');
    }
    return result;
  };
  
  export default [
    {
      input: 'src/index.js',
      output: {
        file: path + '.es.js',
        format: 'es',
      },
      external: [...external, 'raf'],
      plugins: [babel(babelOptions(false))],
    },
    {
      input: 'src/index.umd.js',
      output: {
        name: name,
        file: path + '.js',
        format: 'umd',
        globals: globals,
      },
      external: external,
      plugins: [babel(babelOptions(false)), resolve(), commonjs()],
    },
    {
      input: 'src/index.umd.js',
      output: {
        name: name,
        file: path + '.min.js',
        format: 'umd',
        globals: globals,
      },
      external: external,
      plugins: [
        babel(babelOptions(true)),
        resolve(),
        commonjs(),
        uglify({}, minify),
      ],
    },
  ];
  