Conversation
| } else { | ||
| throw e; | ||
| } | ||
| } |
There was a problem hiding this comment.
Side note: So we are waiting for DOMContentLoaded until we load this chunk from the network? I think this will cause unnecessary delay and we could start this load earlier and only actually execute the code on DOMContentLoaded.
There was a problem hiding this comment.
The waiting time is almost the same as the old approach : index.js before </body></html>.
But yes, we can start the import immediately, and only "init" in DOMContentLoaded, it needs to make the index-domready expose its init function.
There was a problem hiding this comment.
If there are no major benefits to this 2-chunk approach, maybe we should have all main JS in one chunk only. It's simpler design and whether the browser loads 1MB vs. 1.3MB makes no practical difference.
There was a problem hiding this comment.
I also think we can merge them into one index.js and load it in the <head>, total size is about 2.7MB
There was a problem hiding this comment.
That value seems off. In 1.24 I see much lower sizes:
If it is, which part makes the new index.js so large? #34960 (comment)
Or the size difference is caused by different packing options? production vs dev?
There was a problem hiding this comment.
Ah yes likely you are seeing dev values. Dev JS is not minified:
Line 108 in 091b3e6
* giteaofficial/main: [skip ci] Updated translations via Crowdin Docs/fix typo and grammar in CONTRIBUTING.md (go-gitea#35024) fix: improve english grammar and readability in locale_en-US.ini (go-gitea#35017) Add labeler config for `topic/code-linting` (go-gitea#35020) Fix various problems (go-gitea#35012) Fix the response format for `actions/workflows`. (go-gitea#35009)




Uh oh!
There was an error while loading. Please reload this page.