1Panel icon indicating copy to clipboard operation
1Panel copied to clipboard

[Feature] First-screen loading optimization: the current JavaScript bundle size of 1.2MB for first-screen loading is somewhat large. Can we consider switching the i18n files to dynamic loading?

Open cvooc opened this issue 1 month ago • 1 comments

1Panel Version

2.0.11

Please describe your needs or suggestions for improvements

当前静态文件的过期时间是 max-age=3600 1天时间, 首屏进来还没登录就要加载 1.2mb(gzip)的index-u214Kfbc.js. 在我部分小水管和轻量云上经常需要加载10-20s才出登录页.

Please describe the solution you suggest

我看了下项目和代码发现这部分主要是 全量引入的ElementPlus 和 i18n国际化配置. 是否可以优化一下这部分代码,改为按需引入和动态加载. 这种优化带来的体验提升会是巨大的.

Imgur

Additional Information

No response

cvooc avatar Oct 14 '25 04:10 cvooc

感谢反馈 我们会在后续版本优化

zhengkunwang223 avatar Oct 14 '25 06:10 zhengkunwang223

v2.0.13 版本已发布。

wanghe-fit2cloud avatar Nov 20 '25 03:11 wanghe-fit2cloud