Skip to content

Commit 2db2773

Browse files
committed
avoid CIRCULAR_DEPENDENCY warning
1 parent 17d8bcb commit 2db2773

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rollup.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import {terser} from "rollup-plugin-terser";
22
import * as meta from "./package.json";
33

4+
function onwarn(message, warn) {
5+
if (message.code === "CIRCULAR_DEPENDENCY") return;
6+
warn(message);
7+
}
8+
49
const config = {
510
input: "src/index.js",
611
external: Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)),
@@ -13,7 +18,8 @@ const config = {
1318
banner: `// ${meta.homepage} v${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}`,
1419
globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"})))
1520
},
16-
plugins: []
21+
plugins: [],
22+
onwarn
1723
};
1824

1925
export default [

0 commit comments

Comments
 (0)