Conflicts with the define and require functions in bpmn-js integration

Hi guys,

I am trying to embed into a widget oriented web platform but there is conflicts with the define and require functions.

From what I understand bpmn-js use a different implementation of this two pattern as I could observe from the code and as confirmed on this post. Though, it is not clear if uses Webpack as said in that post or bundle-collapser as I can see in the dependency tree of bmpn-js. However, when loaded into the platform, define and require don’t work at all because of this requireJS mismatch error.

Is it possible to isolate the code from web app implementation of define/require or should I try to modify the bpmn-js project to use requireJS library? And how extensive could be the second option? Is there any other option I didnt think of?


Make sure to rename the require calls inside the bundle to avoid these kinds of conflicts. derequire is your friend when bundling the stuff with Browserify.