forked from GetStream/react-activity-feed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
97 lines (93 loc) · 2.39 KB
/
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// @flow
import babel from 'rollup-plugin-babel';
import commonjs from 'rollup-plugin-commonjs';
import external from 'rollup-plugin-peer-deps-external';
import postcss from 'rollup-plugin-postcss';
import json from 'rollup-plugin-json';
import url from 'rollup-plugin-url';
import replace from 'rollup-plugin-replace';
import atImport from 'postcss-easy-import';
import cssnext from 'postcss-cssnext';
import nested from 'postcss-nested';
import colorFunction from 'postcss-color-function';
import vars from 'postcss-simple-vars';
import pkg from './package.json';
import { variables } from './src/variables';
export default {
input: 'src/index.js',
output: [
{
file: pkg.main,
format: 'cjs',
sourcemap: true,
browser: true,
},
{
file: pkg.main,
format: 'umd',
sourcemap: true,
name: 'index.umd',
browser: true,
},
{
file: pkg.module,
format: 'es',
sourcemap: true,
},
],
external: [
'anchorme',
'moment',
'getstream',
'react-images',
'lodash',
'emoji-mart',
'@webscopeio/react-textarea-autocomplete',
'@webscopeio/react-textarea-autocomplete/style.css',
'emoji-mart/css/emoji-mart.css',
'react-dropzone',
'immutable',
'url-parse',
'stream-analytics',
'prop-types',
'@fortawesome/react-fontawesome',
'@fortawesome/free-regular-svg-icons',
'@babel/runtime/regenerator',
'@babel/runtime/helpers/asyncToGenerator',
'@babel/runtime/helpers/objectWithoutProperties',
'@babel/runtime/helpers/toConsumableArray',
'@babel/runtime/helpers/objectSpread',
'@babel/runtime/helpers/extends',
'@babel/runtime/helpers/defineProperty',
'@babel/runtime/helpers/assertThisInitialized',
'@babel/runtime/helpers/inherits',
'@babel/runtime/helpers/getPrototypeOf',
'@babel/runtime/helpers/possibleConstructorReturn',
'@babel/runtime/helpers/createClass',
'@babel/runtime/helpers/classCallCheck',
],
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
}),
external(),
postcss({
plugins: [
atImport(),
nested(),
vars({ variables }),
colorFunction(),
cssnext(),
],
modules: false,
extract: true,
}),
url(),
babel({
runtimeHelpers: true,
exclude: 'node_modules/**',
}),
commonjs(),
json(),
],
};