Problems when rendering some items depending on project/react config
billbarni opened this issue · comments
Describe the Bug
Problems when rendering stuff (htmls... svgs...) when having both Client plugin and Pallete (or any other) Provider plugin.
Steps to Reproduce
https://github.com/billbarni/camunda-modeler-plugin-react-test
1 - add project dir to your modeler resources/plugin dir
2 - npm i
in project dir
3 - npm run dev
in project dir
4 - open modeler and create new Cam 7 BPM
You can see that the Pallete of Camunda Modeler is not able to render the icon correctly.
client/pallete/user-palette-provider.js - lines 22 to 37.
Expected Behavior
IconContext.Provider from react-icons to work... or to ReactDOMServer.renderToString to work...
Or some other way of converting the React icon to HTML inside the modeler plugin
I tried using preact-render-to-string, but it works only with some other bizarre Webpack config, and when it works... the "client" plugin stops working.
Environment
- OS: Windows 10
- Camunda Modeler Version: 5.9.0
Not sure how this is related to the example repository. If this is about @pinussilvestrus' webpack plugin, please keep discussion in the linked issue instead of creating a new one in this repo.