Hi!
When I try to use this library (added with npm) inside an Angular application I get an error saying:
TypeError: Cannot set property 'Rectangle' of undefined.
This error is resolved when I change the getTreemap function inside the index.js to an arrow function.
I try to import the module inside my component as follows:
import * as getTreemap from 'treemap-squarify'; declare var require: any; const { getTreemap } = require('treemap-squarify');