reaviz / reaflow

🎯 React library for building workflow editors, flow charts and diagrams. Maintained by @goodcodeus.
https://reaflow.dev
Apache License 2.0
2.11k stars 122 forks source link

Canvas not rendering due a webpack error #228

Closed carlescamig closed 1 year ago

carlescamig commented 1 year ago

I'm using umi.js as my framework. Since reafow v5.2 I'm getting the following console error:

Layout Error: TypeError: calculate_size__WEBPACK_IMPORTED_MODULE_5__ is not a function

I also tried with a umi fresh install without dependencias and I get the same error. Here's a screenshot

The implementation code is the following:

import { Canvas } from 'reaflow';

export default function HomePage() {
  return <>
  <Canvas
    maxWidth={800}
    maxHeight={600}
    nodes={[
      {
        id: '1',
        text: '1'
      },
      {
        id: '2',
        text: '2'
      }
    ]}
    edges={[
      {
        id: '1-2',
        from: '1',
        to: '2'
      }
    ]}
  />;
  </>
}

Browser: