refactor(demo): fetch the BPMN diagrams#287
Conversation
|
🎊 PR Preview 618d8c1 has been successfully built and deployed to https://process-analytics-bv-experimental-add-ons-demo-pr-287.surge.sh 🕐 Build time: 0.011s 🤖 By surge-preview |
Produced Chunksmain first implementation (duplicate diagram fetch in all demo entry points) 34b0b99 after introducing the ef7f787 final commit, after using the "import URL" support provided by vite (https://vitejs.dev/guide/assets#importing-asset-as-url) |
|
tbouffard
left a comment
There was a problem hiding this comment.
✔️ Tested locally with the development server
✔️ Tested with the surge preview environment




Previously, the diagram was stored in JavaScript chunks.
This increased the size of the chunks and did not reflect what an application generally does: it does not store diagrams, they are retrieved from services or APIs.
Fetching the diagram reduces the size of the JavaScript chunks and makes the demo closer to a real application.
Notes
Closes #72
Tasks
try to use import.meta.url when fetching the diagram, see https://vitejs.dev/guide/assets#new-url-url-import-meta-url: not needed, using the URL in import works