Integrate bpmn-visualization in a vanilla webpack JavaScript project
May 4, 2022 ยท View on GitHub
Usage
To run locally:
npm installnpm run serve- localhost app
You will see the following diagram:

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.