-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.js
94 lines (91 loc) · 2.6 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
import replace from 'rollup-plugin-replace'
import buble from 'rollup-plugin-buble'
const common = {
moduleName: 'Pagination',
entry: 'index.js',
sourceMap: true,
interop: false,
exports: 'default',
}
export default [Object.assign({}, common, {
targets: [
{ dest: 'react/Pagination.es.js', format: 'es' },
{ dest: 'react/Pagination.js', format: 'umd' },
],
plugins: [
replace({ '// ___JSX_IMPORT___': "import React from 'react'" }),
buble({
objectAssign: 'Object.assign',
}),
],
external: ['react', 'prop-types'],
globals: {
'react': 'React',
'prop-types': 'PropTypes',
},
}), Object.assign({}, common, {
entry: 'reactstrap.js',
targets: [
{ dest: 'react/PaginationReactstrap.es.js', format: 'es' },
{ dest: 'react/PaginationReactstrap.js', format: 'umd' },
],
plugins: [
replace({ '// ___JSX_IMPORT___': "import React from 'react'" }),
buble({
objectAssign: 'Object.assign',
}),
],
external: ['react', 'prop-types', 'reactstrap'],
globals: {
'react': 'React',
'reactstrap': 'Reactstrap',
'prop-types': 'PropTypes',
},
}), Object.assign({}, common, {
entry: 'reactrouter.js',
targets: [
{ dest: 'react/PaginationReactRouter.es.js', format: 'es' },
{ dest: 'react/PaginationReactRouter.js', format: 'umd' },
],
plugins: [
replace({ '// ___JSX_IMPORT___': "import React from 'react'" }),
buble({
objectAssign: 'Object.assign',
}),
],
external: ['react', 'prop-types', 'reactstrap', 'qs'],
globals: {
'react': 'React',
'prop-types': 'PropTypes',
'reactstrap': 'Reactstrap',
'qs': 'qs',
},
}), Object.assign({}, common, {
targets: [
{ dest: 'preact/Pagination.es.js', format: 'es' },
{ dest: 'preact/Pagination.js', format: 'umd' },
],
plugins: [
replace({ '// ___JSX_IMPORT___': "import { h } from 'preact'" }),
buble({
jsx: 'h',
objectAssign: 'Object.assign',
}),
],
external: ['preact'],
globals: { preact: 'preact' },
}), Object.assign({}, common, {
targets: [
{ dest: 'vhtml/Pagination.es.js', format: 'es' },
{ dest: 'vhtml/Pagination.js', format: 'umd' },
],
plugins: [
replace({ '// ___JSX_IMPORT___': "import h from 'vhtml'" }),
buble({
jsx: 'h',
objectAssign: 'Object.assign',
}),
],
external: ['vhtml'],
globals: { vhtml: 'h' },
})]