Skip to content

Commit

Permalink
Tidy up rollup config (#2788)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound authored and jossmac committed Jul 13, 2018
1 parent c40ea23 commit f1cb4ee
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import commonjs from 'rollup-plugin-commonjs';
import resolve from 'rollup-plugin-node-resolve';
import uglify from 'rollup-plugin-uglify';
import { minify } from 'uglify-es';
import pkg from './package.json';

const name = 'Select';
const path = 'dist/react-select';
Expand Down Expand Up @@ -36,7 +37,7 @@ export default [
{
input: 'src/index.js',
output: {
file: path + '.es.js',
file: pkg.module,
format: 'es',
},
external: [...external, 'raf'],
Expand All @@ -45,23 +46,23 @@ export default [
{
input: 'src/index.umd.js',
output: {
name: name,
name,
file: path + '.js',
format: 'umd',
globals: globals,
globals,
},
external: external,
external,
plugins: [babel(babelOptions()), resolve(), commonjs()],
},
{
input: 'src/index.umd.js',
output: {
name: name,
name,
file: path + '.min.js',
format: 'umd',
globals: globals,
globals,
},
external: external,
external,
plugins: [babel(babelOptions()), resolve(), commonjs(), uglify({}, minify)],
},
];

0 comments on commit f1cb4ee

Please sign in to comment.