Open alexandernst opened 3 years ago
Because of how the code is designed, most of the times more than 1 L
expression will be generated for the same point, causing unnecesary SVG instructions. This patch fixes this: https://github.com/Develatio/react-diagrams/commit/715e611786b57e7e10c5942dd9220c203c663132
Currently
paths-js
is used in a single place in order to generate a SVG path. The code can be easily replaced with ~10 lines of pure JS code. This will allow for the entirepaths-js
dependency to be dropped, reducing the size of the final bundle vy ~56kb (before gzip).You can check a diff here: https://github.com/Develatio/react-diagrams/commit/ecfed4a035653f7678587784089ad7262db3cc2b
Feel free to use the diff and merge it in this repo :)