forked from reactstrap/reactstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
41 lines (38 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
import nodeResolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import babili from 'rollup-plugin-babili';
import replace from 'rollup-plugin-replace';
const config = {
moduleName: 'Reactstrap',
entry: 'src/index.js',
plugins: [
nodeResolve(),
commonjs(),
babel({
plugins: ['external-helpers'],
}),
],
sourceMap: true,
external: [
'react',
'react-dom',
'react-transition-group',
],
// Used for the UMD bundles
globals: {
react: 'React',
'react-dom': 'ReactDOM',
},
targets: [
{ dest: 'dist/reactstrap.es.js', format: 'es' },
{ dest: 'dist/reactstrap.min.js', format: 'umd' },
],
};
if (process.env.NODE_ENV === 'production') {
config.plugins.push(babili({ comments: false }));
config.plugins.push(replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}));
}
export default config;