forked from apollographql/graphql-tag
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrollup.config.js
50 lines (47 loc) · 917 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
42
43
44
45
46
47
48
49
50
import sourceMapsPlugin from 'rollup-plugin-sourcemaps';
const globals = {
tslib: 'tslib',
graphql: 'graphql',
chai: 'chai',
'source-map-support/register': 'sourceMapSupport',
};
const { hasOwnProperty } = Object.prototype;
function external(id) {
return hasOwnProperty.call(globals, id);
}
export default [
{
input: 'lib/index.js',
plugins: [
sourceMapsPlugin(),
],
external,
output: [
{
file: 'lib/graphql-tag.umd.js',
format: 'umd',
globals,
name: 'graphql-tag',
sourcemap: true,
exports: 'named'
}
],
},
{
input: 'lib/tests.js',
plugins: [
sourceMapsPlugin(),
],
external,
output: [
{
file: 'lib/tests.cjs.js',
format: 'commonjs',
globals,
name: 'graphql-tag/tests',
sourcemap: true,
exports: 'named'
}
],
},
];