| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Well done! maxgraph-core-commonjs updated. (CommonJS build of @maxgraph/core enabling easier headless (nodejs) use) |
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
{{title}}
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
{{editor}}'s edit
{{editor}}'s edit
Uh oh!
There was an error while loading. Please reload this page.
⚡ This new version improves tree-shaking for EdgeStyle and Perimeter, updates the documentation, and fixes bugs. ⚡
Resources
Breaking changes
Warning
These changes only impact advanced use cases where edge styles or perimeters are customized directly.
EdgeStyle is now a namespace
It used to be a class with static properties. You could technically mutate it to add or override values — but that’s no longer possible.
If you were doing this, you now need to define your own EdgeStyle implementation and register it explicitly.
Perimeter is now a namespace
Previously a plain object, Perimeter could be mutated too. Not anymore.
Like with EdgeStyle, create your own perimeter implementation and register it if needed.
Highlights
📦 Tree-shaking improvements for EdgeStyle and Perimeter
Until now, all edge styles and perimeters were bundled into your app even if you only used a few of them. Why? Because EdgeStyle and Perimeter were objects that referenced everything, which prevented bundlers from optimizing properly.
Here’s what changed:
Note
Bundlers like Rollup already did a great job here. But now all bundlers should behave nicely 🎉
📉 Impact on bundle size
Depending on what edge styles and perimeters your app uses, and the bundler you're using, bundle size can shrink by 1 to 5 kB.
🔍 A few things to keep in mind
Here’s a concrete example of what Rollup was doing with the old object-based Perimeter (with minification disabled):
Only the perimeters actually used are bundled in.
🔬 Real-world examples from the maxGraph repo
Note
JS examples use Webpack, TS examples use Vite (Rollup)
⚠️ The TS and JS examples don't cover the same use cases
📦 In JS examples: the size = full app
📦 In TS examples: the size = maxGraph chunk only
Analysis:
🔬 Examples from the maxgraph-integration-examples repository
What's Changed
🎉 New Features
🐛 Bug Fixes
📝 Documentation
⚙️ Refactor
Full Changelog: v0.18.0...v0.19.0
This discussion was created from the release 0.19.0.