Skip to content

[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? #10628

@cvooc

Description

@cvooc

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions