forked from atlassian/react-beautiful-dnd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
32 lines (29 loc) · 824 Bytes
/
rollup.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* eslint-disable flowtype/require-valid-file-annotation */
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import uglify from 'rollup-plugin-uglify';
import babel from 'rollup-plugin-babel';
import replace from 'rollup-plugin-replace';
import yargs from 'yargs';
const args = yargs.argv;
export default {
input: './lib/index.js',
output: {
file: `dist/react-beautiful-dnd${args.min ? '.min' : ''}.js`,
format: 'umd',
},
name: 'ReactBeautifulDnd',
plugins: [
babel({ exclude: 'node_modules/**', babelrc: false }),
resolve(),
commonjs(),
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}),
].concat(
args.min ? uglify() : []
),
sourceMap: false,
external: ['react'],
globals: { react: 'React' },
};