swimlane / ngx-graph

Graph visualization library for angular
https://swimlane.github.io/ngx-graph
MIT License
929 stars 284 forks source link

Change dagre for dagre-esm in order to use ES Modules (Link in description) #400

Open sergioescudero9 opened 3 years ago

sergioescudero9 commented 3 years ago

For angular > 9 applications, a warning is being shown:

Warning: C:\Users\sres\Documents\Projects\dashboard-grid-frontend-fork\node_modules\@swimlane\ngx-graph__ivy_ngcc__\fesm2015\swimlane-ngx-graph.js depends on 'dagre'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

This is because the dependency 'dagre ' is built using CommonJs. Here is a version for 'dagre' using instead of CommonJs, ES module imports/exports

https://github.com/codeStryke/dagre-esm

I kindly ask to update this library to reduce bundle size

Jbisatto commented 7 months ago

I'm having the same problem in Angular 13, is there any solution for this? @sergioescudero9