forked from jgraph/mxgraph
-
Notifications
You must be signed in to change notification settings - Fork 199
Open
Milestone
Description
Is your documentation request related to a problem? Please describe.
#760 provides a way to highly reduce the footprint of maxGraph in applications.
The documentation currently only mention the Graph class which limits tree-shaking.
Describe the solution you'd like
The documentation should provides guidance and best-pratices to reduce the bundle size of applications using maxGraph.
-
Create a dedicated documentation page for tree-shaking
- Explain tree-shaking patterns with maxGraph, and add links to existing pages
- Detail in particular:
- global configuration
- only use and register the features used in the application
- registration functions
- codecs, plugins, perimeters, edgestyles, logger, i18n, ....
- links to relevant issues like Strategies for Further Tree-Shaking Improvements #665 and children
-
Document usage patterns for both
GraphandBaseGraph- Explain pros/cons of the 2 classes
- Describe the differences
- introduce BaseGraph which prevents from loading some maxGraph default
- code example: comparison of the signature of the constructors
- link to examples and stories
Additional context
Summary from OpenAI Codex
- Graph is the ready-to-use DOM graph class; it wires a container, default model/view, registers built-in shapes, markers, and loads the default plugin set for prototyping (packages/core/src/view/Graph.ts:41).
- BaseGraph exposes the minimal, tree-shakeable graph skeleton for production builds where you opt into specific plugins/styles yourself (packages/core/src/view/BaseGraph.ts:34).
Metadata
Metadata
Assignees
Labels
No labels