Как убрать циклические зависимости в выборе d3, используя накопительный пакет js? - PullRequest
0 голосов
/ 01 апреля 2020

На самом деле я пытаюсь связать свой проект d3 с помощью Rollup js, но когда я использовал ./node_modules/.bin/rollup - c в терминале, появилась ошибка, то есть


src/scripts/index.js → sample/bundle.js...
(!) Circular dependencies
node_modules\d3-selection\src\selection\index.js -> node_modules\d3-selection\src\selection\select.js -> node_modules\d3-selection\src\selection\index.js
node_modules\d3-selection\src\selection\index.js -> node_modules\d3-selection\src\selection\selectAll.js -> node_modules\d3-selection\src\selection\index.js
node_modules\d3-selection\src\selection\index.js -> node_modules\d3-selection\src\selection\filter.js -> node_modules\d3-selection\src\selection\index.js
...and 16 more
created sample/bundle.js in 2.4s

мой накопительный пакет .config. js файл содержит

import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";

export default {
  input: "src/scripts/index.js",
  output: {
    file: "sample/bundle.js",
    format: "cjs"
  },
  plugins: [
    resolve({
      browser: true
    }),
    commonjs()
  ]
};

Может кто-нибудь помочь мне решить эту проблему?

...