Skip to content

Commit

Permalink
Hide rollup warnings related to issues in dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Kissling committed Oct 31, 2023
1 parent 12f1ec5 commit 7922e74
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
10 changes: 10 additions & 0 deletions rollup.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,14 @@ export default {
},
}),
],
onwarn(warning, warn) {
if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.message.includes('/luxon/')) {
// https://github.com/moment/luxon/issues/193
return;
} else if (warning.code === 'THIS_IS_UNDEFINED' && warning.id.includes('@formatjs')) {
// https://github.com/custom-cards/custom-card-helpers/issues/64
return
}
warn(warning);
},
};
14 changes: 12 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default [
dir: 'dist',
format: 'es',
},
plugins: [
plugins: [
image(),
nodeResolve(),
commonjs(),
Expand All @@ -26,6 +26,16 @@ export default [
}),
terser(),
gzipPlugin()
]
],
onwarn(warning, warn) {
if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.message.includes('/luxon/')) {
// https://github.com/moment/luxon/issues/193
return;
} else if (warning.code === 'THIS_IS_UNDEFINED' && warning.id.includes('@formatjs')) {
// https://github.com/custom-cards/custom-card-helpers/issues/64
return
}
warn(warning);
},
},
];

0 comments on commit 7922e74

Please sign in to comment.