Actually I am trying to bundle my d3 project using Rollupjs but when I used ./node_modules/.bin/rollup -c in terminal an error appeared i.e.
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
my rollup.config.js file contains
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()
]
};
Can anyone help me to resolve this issue?