forked from greena13/react-hotkeys
-
Notifications
You must be signed in to change notification settings - Fork 3
/
rollup.config.js
51 lines (41 loc) · 919 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import babel from 'rollup-plugin-babel';
import { uglify } from 'rollup-plugin-uglify';
import license from 'rollup-plugin-license';
import strip from 'rollup-plugin-strip';
import path from 'path';
/**
* This configuration (and Rollup) is only used for the production builds
*/
export default {
input: 'src/index.js',
output: {
exports: 'named',
globals: {
'prop-types': 'PropTypes',
react: 'React'
},
},
external: [
'prop-types',
'react',
'react-dom',
],
plugins: [
babel({
exclude: 'node_modules/**'
}),
strip({
debugger: true,
functions: [
'console.log', 'assert.*', 'debug', 'alert',
'*.logger.verbose', '*.logger.debug', '*.logger.info'
]
}),
process.env.BABEL_ENV === "production" && uglify(),
license({
banner: {
file: path.join(__dirname, 'LICENSE')
}
})
]
};