-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathrollup.config.js
37 lines (35 loc) · 995 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
import { rollup } from 'rollup';
import jsx from 'rollup-plugin-jsx';
import buble from 'rollup-plugin-buble'
import cjs from 'rollup-plugin-commonjs'
import globals from 'rollup-plugin-node-globals'
import npm from 'rollup-plugin-npm'
import replace from 'rollup-plugin-replace'
import resolve from 'rollup-plugin-node-resolve'
export default {
entry: 'src/main.jsx',
format: 'iife',
moduleName:'sup_react',
plugins: [
buble(),
cjs({
exclude: 'node_modules/process-es6/**',
include: [
'node_modules/fbjs/**',
'node_modules/object-assign/**',
'node_modules/react/**',
'node_modules/react-dom/**',
'node_modules/react-audio-player/**'
]
}),
globals(),
jsx( {factory: 'React.createElement'}),
npm({ main: true }),
replace({
'process.env.NODE_ENV': JSON.stringify( 'development' )
}),
resolve({ browser: true })
],
dest: 'src/bundle.js',
sourceMap: true // equivalent to --output
}