Bundling Issue with Rollup


#1

Hi,

I have created a Custom Modeler with a lot of standard modules like Properties-Panel and custom modules.
To bundle my modeler I use rollup.

The Properties-Panel includes some other modules like ‘scroll-tabs’.
This is implemented with

export default function create($el, options) { ... }

and loaded in ‘PropertiesPanel.js’ with

var scrollTabs = require('scroll-tabs').default;

After rollup this line looks like
var scrollTabs = create$2.default;

and during execution the variable scrollTabs is undefined and I got an error.

My rollup.config.js looks following.

import commonjs from 'rollup-plugin-commonjs';
import json from 'rollup-plugin-json';
import nodeResolve from 'rollup-plugin-node-resolve';
import uglify from 'rollup-plugin-uglify';
import replace from 'rollup-plugin-replace';

export default {
  input: 'app/fisxee-modeler/index.js',
  output: {
    file: 'test/fisxee-modeler.bundled.js',
    name: 'FisXeeBpmnJS',
    format: 'umd', // 'cjs'
    sourceMap: 'inline'
  },
  plugins: [
    nodeResolve({
      module: true,
      browser: true
    }),
     commonjs({
       include: ['app/fisxee-modeler/**', 'node_modules/**']
     }),
    json(),
  ]
};

Do you have any idea how I can make it running?
Do you need more information?

Thanks in advanced,
Anja


#2

Hi @Anja

For bundling I used webpack and worked for me successfully, for more information See this link to get help include GitHub link and resources

Bpmn-js-modules