Closed corocoto closed 1 year ago
I met with this error again, when using es modules. To fix this problem, I decided to use 'OR' condition to get truly BpmnModdle class for both available types (commonjs, es modules). I believe that this PR fully closes and resolves the BpmnModdle is not a constructor error.
How do you try to consume this library?
I think we want to settle on a library target (is this ES or CJS modules), clean this up, and potentially provide a pre-built distribution for it (that works independent of the usage context).
You'll likely run into troubles otherwise, depending how you include things.
How do you try to consume this library?
I transform input JSON data, received from the backend side, to the BPMN object. After the previous step, I continue to construct the BPMN structure by adding DI elements and their own positions and sizes. In the end, I display the result on the page.
I think we want to settle on a library target (is this ES or CJS modules), clean this up, and potentially provide a pre-built distribution for it (that works independent of the usage context).
You'll likely run into troubles otherwise, depending how you include things.
Hm, you're right, @nikku. I think it's the correct view of things. So, after our discussion, I decided to close this PR, because it became irrelevant.
https://github.com/bpmn-io/bpmn-auto-layout/pull/31#issuecomment-1490069293
From ES or CJS context? In the browser or in NodeJS?
@nikku, from ES context (in the browser environment)
@corocoto Unfortunately we were not able to follow up on this PR on time. We'll close this for the time being and hope that we can revive this project some time in the future.
Description
I met with this error again, when using es modules. To fix this problem, I decided to use 'OR' condition to get truly
BpmnModdle
class for both available types (commonjs, es modules). I believe that this PR fully closes and resolves theBpmnModdle is not a constructor
error.Related PRs:
Related issues: