awslabs / diagram-maker

A library to display an interactive editor for any graph-like data.
https://awslabs.github.io/diagram-maker
Apache License 2.0
2.4k stars 137 forks source link

Revisit dependency bundling to be able to use in react projects #95

Closed sameergoyal closed 2 years ago

sameergoyal commented 2 years ago

Issue #, if available:

Description of changes: After changing the bundling strategy, we were marking preact & react-redux as our deps. However, internally we alias preact/compat as react. When diagram-maker is used inside of a react project, it creates a conflict. When diagram maker calls react-redux, it calls react which needs to be aliased to preact within the diagram maker scope. The long term way forward would be:

Until we take on the above, reverting back to the old way of bundling so we can use diagram maker in react based projects.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.