-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathrollup.config.mjs
89 lines (87 loc) · 1.98 KB
/
rollup.config.mjs
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
import commonjs from '@rollup/plugin-commonjs';
import json from '@rollup/plugin-json';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import nodePolyfills from 'rollup-plugin-polyfill-node';
const plugins = [commonjs({}), json(), nodeResolve({ browser: true })];
export default [
{
input: 'node_modules/country-data/index.js',
output: {
file: 'src/browserified/country-data/index.js',
format: 'umd',
name: 'CountryData',
},
plugins,
},
{
input: 'node_modules/delay/index.js',
output: {
file: 'src/browserified/delay/index.js',
format: 'umd',
name: 'Delay',
},
plugins,
},
{
input: 'node_modules/mf-parser/src/index.js',
output: {
file: 'src/browserified/MFParser/index.js',
format: 'umd',
name: 'MFParser',
},
plugins,
},
{
input: 'node_modules/mime-types/index.js',
output: {
file: 'src/browserified/mime-types/index.js',
format: 'umd',
name: 'mimeTypes',
},
plugins: [...plugins, nodePolyfills()],
},
{
input: 'node_modules/openchemlib/dist/openchemlib.js',
output: {
file: 'src/browserified/openchemlib/openchemlib.js',
format: 'amd',
exports: 'named',
},
},
{
input: 'node_modules/rxn-renderer/lib/index.js',
output: {
file: 'src/browserified/RxnRenderer/index.js',
format: 'umd',
name: 'RxnRenderer',
},
plugins,
},
{
input: 'node_modules/smart-array-filter/lib/index.js',
output: {
file: 'src/browserified/SmartArrayFilter/index.js',
format: 'umd',
name: 'SAF',
},
plugins,
},
{
input: 'node_modules/superagent/lib/client.js',
output: {
file: 'src/browserified/superagent/index.js',
format: 'umd',
name: 'superagent',
},
plugins,
},
{
input: 'node_modules/twig/twig.min.js',
output: {
file: 'src/browserified/twig/twig.js',
format: 'umd',
name: 'Twig',
},
plugins,
},
];