web-infra-dev / rspress

🦀💨 A fast Rspack-based static site generator.
https://rspress.dev
MIT License
1.19k stars 107 forks source link

[optimize]: Reduce virtual-site-data.mjs runtime module size #1102

Open Timeless0911 opened 1 month ago

Timeless0911 commented 1 month ago

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.