Integrate bpmn-visualization in a vanilla webpack JavaScript project

May 4, 2022 ยท View on GitHub

Usage

To run locally:

  1. npm install
  2. npm run serve
  3. localhost app

You will see the following diagram:

BPMN diagram in the home page

The code calling bpmn-visualization to render the BPMN diagram is available in index.js. Any code changes is quickly made available in the browser.

WARNING about the webpack configuration

Make sure you have defined the mainFields in the configuration, otherwise, bpmn-visualization doesn't load correctly. In this project, this is configured in webpack.config.js.

    resolve:{
        mainFields: ['module', 'main'],
    },

See the webpack 'resolve main fields' documentation for more details.