-
Notifications
You must be signed in to change notification settings - Fork 2
/
rollup.config.js
39 lines (33 loc) · 900 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
import sourcemaps from "rollup-plugin-sourcemaps";
const globals = {
// Apollo
"apollo-client": "apollo.core",
"apollo-link": "apolloLink.core",
"apollo-link-batch": "apolloLink.batch",
"apollo-utilities": "apollo.utilities",
"apollo-link-http-common": "apolloLink.httpCommon",
"zen-observable-ts": "apolloLink.zenObservable",
//GraphQL
"graphql/language/printer": "printer",
"zen-observable": "Observable"
};
module.exports = {
input: "lib/index.js",
output: {
file: "lib/bundle.umd.js",
format: "umd",
name: `apolloLink.gun`,
globals,
sourcemap: true,
exports: "named"
},
external: Object.keys(globals),
onwarn,
plugins: [sourcemaps()]
};
function onwarn(message) {
const suppressed = ["UNRESOLVED_IMPORT", "THIS_IS_UNDEFINED"];
if (!suppressed.find(code => message.code === code)) {
return console.warn(message.message);
}
}