Skip to content

Commit 1e93e63

Browse files
committed
chore(rollup): suppress few warnings
1 parent b2a31aa commit 1e93e63

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

rollup.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export default {
33
dest: 'build/bundles/apollo.umd.js',
44
format: 'umd',
55
moduleName: 'ng.apollo',
6+
onwarn,
67
globals: {
78
'@angular/core': 'ng.core',
89
'rxjs/Observable': 'Rx',
@@ -12,3 +13,14 @@ export default {
1213
'apollo-client': 'apollo',
1314
}
1415
}
16+
17+
function onwarn(message) {
18+
const suppressed = [
19+
'UNRESOLVED_IMPORT',
20+
'THIS_IS_UNDEFINED'
21+
];
22+
23+
if (!suppressed.find(code => message.code === code)) {
24+
return console.warn(message.message);
25+
}
26+
}

0 commit comments

Comments
 (0)