Using BpmnModeller and properties-panel from snowpack-based app

I am trying to get the BpmnModeller (and properties-panel) working in a webapp that uses snowpack (link removed as new users can only have two links in a post; you will have to google…). It basically eliminates the bundeling-step and allows the uses of ES6 modules in supported browsers.
The BpmnModeller intself works without problems and I have been using the Viewer with this approach for some time already.
But the dependency to the properties-panel I am not able to get working. Maybe someone has a hint/comment.
Also, as snowpack uses rollup behind the scenes I assume the discussion here might still apply? Bpmn-properties-panel pre-packaged by rollup,undefined event and query after out~

Anyway, I was hopeing there might be a way to maybe get it running. For that reason i have put my progress online in this git repo:

If you just run ‘npm install’ and ‘npm start’ you should see that the modeller runs without problems.
Go to src/index.js and comment in the configuration for the properties panel, you will see it stop working:

var bpmnModeler = new BpmnModeler({
  container: canvas/*,
  propertiesPanel: {
    parent: '#js-properties-panel'
  additionalModules: [

I was fiddeling around and noticed that it might have something to do with how snowpack/rollup packages everything together and if I make a manual change in the web_modules/bpmn-js-properties-panel/lib/index.js i get the properties-panel loaded but there are other problems still:

End of the file I change this (see inline comment):

var lib = {
  __depends__: [
    translate.default // <------ THIS LINE I REMOVE THE ".default"
  __init__: [ 'propertiesPanel' ],
  propertiesPanel: [ 'type', PropertiesPanel_1 ]
var lib_1 = lib.__depends__;
var lib_2 = lib.__init__;
var lib_3 = lib.propertiesPanel;

export default lib;
export { lib_1 as __depends__, lib_2 as __init__, lib_3 as propertiesPanel };

Anyway, maybe with more knowledge of rollup and module-depnendecies can nudge me in the right direction or tell me that this cannot work (as hinted in the other linked post). If it cannot work out of the box, I would still be insterested in what options/steps might be needed to get it working.

Thanks in advance,

1 Like