Skip to content

Commit

Permalink
avoid CIRCULAR_DEPENDENCY warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Jul 24, 2020
1 parent 17d8bcb commit 2db2773
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rollup.config.js
@@ -1,6 +1,11 @@
import {terser} from "rollup-plugin-terser";
import * as meta from "./package.json";

function onwarn(message, warn) {
if (message.code === "CIRCULAR_DEPENDENCY") return;
warn(message);
}

const config = {
input: "src/index.js",
external: Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)),
Expand All @@ -13,7 +18,8 @@ const config = {
banner: `// ${meta.homepage} v${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}`,
globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"})))
},
plugins: []
plugins: [],
onwarn
};

export default [
Expand Down

0 comments on commit 2db2773

Please sign in to comment.