-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrollup.config.js
More file actions
34 lines (29 loc) · 831 Bytes
/
rollup.config.js
File metadata and controls
34 lines (29 loc) · 831 Bytes
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
import babel from 'rollup-plugin-babel';
import replace from 'rollup-plugin-replace';
import uglify from 'rollup-plugin-uglify';
import license from 'rollup-plugin-license';
import path from 'path';
export default {
input: 'src/index.js',
output: {
format: 'cjs',
file: process.env.NODE_ENV === 'production' ? 'cjs/react-simple-file-input.production.min.js' : 'cjs/react-simple-file-input.development.js',
exports: 'named'
},
external: [ 'react', 'prop-types' ],
plugins: [
babel({
exclude: 'node_modules/**'
}),
replace({
exclude: 'node_modules/**',
ENV: JSON.stringify(process.env.NODE_ENV || 'development')
}),
(process.env.NODE_ENV === 'production' && uglify()),
license({
banner: {
file: path.join(__dirname, 'LICENSE'),
}
})
]
};