rspack icon indicating copy to clipboard operation
rspack copied to clipboard

[Feature]: Add loading style to lazy compilation to improve user experience

Open zhangdaren opened this issue 1 year ago • 3 comments

What problem does this feature solve?

Now if lazy compilation is enabled, the startup speed is very fast. When switching routes, the route needs to be temporarily loaded, which causes a waiting time, and there is no prompt on the page, causing users to think that the page is stuck. Therefore, it is recommended to add loading at the top of the page after turning on lazy compilation to tell users that it is loading.

现在如果开启 lazy compilation时,启动速度很快。 在切换路由时,则需要临时加载路由,导致需要等待一段时间,而且页面毫无提示,导致用户以为页面卡死。因此,建议在开启 lazy compilation后,在页面顶部增加loading,来告诉用户正在加载中。

What does the proposed API look like?

zhangdaren avatar Sep 03 '24 06:09 zhangdaren