SkyeYoung commented on PR #3169: URL: https://github.com/apache/apisix-dashboard/pull/3169#issuecomment-3186237525
I've added manual chunks to determine the size occupied by Monaco. ```text // old dist/assets/apisix-logo-HMKlWzJ1.svg 0.81 kB │ gzip: 0.39 kB dist/index.html 0.86 kB │ gzip: 0.41 kB dist/assets/codicon-DCmgc-ay.ttf 80.34 kB dist/assets/editor.worker-oRlJJsnX.js 234.39 kB dist/assets/json.worker-BnUULff4.js 366.81 kB dist/assets/monaco-editor-vendor-C37UlGMP.css 133.05 kB │ gzip: 21.19 kB ... dist/assets/react-vendor-DoC2WAmd.js 12.45 kB │ gzip: 4.41 kB dist/assets/monaco-editor-vendor-vNTR5Nef.js 16.29 kB │ gzip: 5.75 kB dist/assets/index-F8cMEI97.js 781.75 kB │ gzip: 240.26 kB dist/assets/antd-vendor-6KqauUkE.js 1,910.39 kB │ gzip: 602.56 kB // new dist/assets/apisix-logo-HMKlWzJ1.svg 0.81 kB │ gzip: 0.39 kB dist/index.html 0.86 kB │ gzip: 0.40 kB dist/assets/codicon-DCmgc-ay.ttf 80.34 kB dist/assets/editor.worker-oRlJJsnX.js 234.39 kB dist/assets/json.worker-BnUULff4.js 366.81 kB dist/assets/monaco-editor-vendor-CUMOsoFg.css 133.05 kB │ gzip: 21.21 kB ... dist/assets/react-vendor-DoC2WAmd.js 12.45 kB │ gzip: 4.41 kB dist/assets/jsonMode-BmdQK4IJ.js 41.83 kB │ gzip: 12.15 kB dist/assets/index-D_R-G-sa.js 781.70 kB │ gzip: 240.25 kB dist/assets/antd-vendor-C01oSD3T.js 1,910.39 kB │ gzip: 602.57 kB dist/assets/monaco-editor-vendor-DU3RmTXG.js 3,280.78 kB │ gzip: 846.12 kB ``` We will find that the size of the Monaco editor starts from (gzip: 602.56 kB) to (gzip: 846.12 kB). But I think the Monaco editor part is necessary for now. As for the size, there might be ways to further reduce the volume, but I don't have time to research further at the moment. (We might as well consider removing parts of antd.) Manual chunks will optimize the first screen loading to some extent, and I've decided to keep it in this PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org