-
Notifications
You must be signed in to change notification settings - Fork 2
/
rollup.config.js
43 lines (42 loc) · 956 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
import babel from 'rollup-plugin-babel'
import resolve from 'rollup-plugin-node-resolve'
import commonJS from 'rollup-plugin-commonjs'
import builtins from 'rollup-plugin-node-builtins'
import sizes from 'rollup-plugin-sizes'
module.exports = {
input: './lib/entry.js',
output: {
format: 'cjs',
file: './dist/bundle.js'
},
external: ['fs', 'path', 'child_process', 'atom', 'os', 'net'],
plugins: [
babel({
babelrc: false,
presets: ['es2015-rollup'],
exclude: ['node_modules/**', '**/*.json'],
plugins: ['transform-object-rest-spread', 'transform-react-jsx']
}),
resolve({
jsnext: true
}),
commonJS({
include: 'node_modules/**',
namedExports: {
'./node_modules/react/index.js': [
'cloneElement',
'createElement',
'PropTypes',
'Children',
'Component',
'PureComponent'
],
'./node_modules/react-dom/index.js': [
'findDOMNode'
]
}
}),
builtins(),
sizes()
]
}