How to add Element templates to bpmn-js bower bundle?

I have bower package where i am trying to add Element template please provide some example how we can get element templates working in bower bpmn-js bundle.


var bpmnModeler = new BpmnViewer({
      container: '#canvas',
        parent: '#js-properties-panel'


var camundaModdleDescriptor = require('camunda-bpmn-moddle/resources/camunda');

var additionalModules = [

  // 1. require camunda provider instead of the bpmn one (!)

BpmnViewer.prototype._modules = BpmnViewer.prototype._modules.concat(additionalModules);

// 2. include camunda moddle descriptor
BpmnViewer.prototype._moddleExtensions = { camunda: camundaModdleDescriptor }

module.exports = BpmnViewer;

Element templates won’t work out of the box due to the missing properties panel in the pre-packaged bower bundle.

You need to create a bundle yourself, using the BpmnModeler and the Properties Panel. C.f. this thread for more a more detailed example.