Stencil component crashes with d3js

#1

I´m building a small chart component using stencil and d3js. Every time I import one of d3 modules like:

import { select } from "d3-selection";
import { scaleLinear } from "d3-scale";
import { min, max } from "d3-array";
import { axisBottom, axisLeft } from "d3-selection";

The component builds correctly but doesn’t render anything in the screen and in the browser console I have:

function-graph.core.js:1476 SyntaxError: Identifier ‘hue’ has already been declared “http://localhost:3333/build/function-graph/function-graph.entry.js

No matter which d3 module I import or how I use it, it gives always the same error. I have used it in angular applications and it works fine. I believe this could be related to how stencil manage modules.