rspress
rspress copied to clipboard
[optimize]: Reduce virtual-site-data.mjs runtime module size
What problem does this feature solve?
In huge scale doc site project, the virtual-site-data.mjs will be 100, 000+ lines, which may be 3M+.
This results in the startup time of the entry, thus even we enable lazy compilation, it still need 1s to load the entry.
We can do something to split this file.
The virtual-site-data seems unnecessary, as its purpose is only to achieve automated navigation bars. We should consider how to optimize the logic.
In addition, it scanned and parsed all MD files once, which increased the build time to some extent.