dagrejs / dagre-d3

A D3-based renderer for Dagre
MIT License
2.83k stars 588 forks source link

怎样在angular6项目中使用 #347

Open mimiyoo opened 5 years ago

mimiyoo commented 5 years ago

按照一贯的步骤在安装完dagre-d3后,import到项目中后,任然报错graphlib.js:5 Uncaught Error: Cannot find module "."

yemanr commented 5 years ago

i find there's no main field in package.json, so import from 'dagre-d3' is import the package's root index.js. there's a build js in the dist, just import this one will fix it. import dagreD3 from 'dagre-d3/dist/dagre-d3';