I was experiencing the same warning as described in Vite, Rollup, Chuncking - #3 by charliesideroad
I tried the same solution described (splitting Engine and Scene into a separate module), but it still left me with a 9 MiB file (well over the 500 KB limit). With the help of npx vite-bundle-visualizer
I found that the two biggest modules were gui-editor and inspector. They are 2 MB and 2.5 MiB respectively and can’t be split, as they have no submodules.
Now one question is why the GUI Editor would be statically loaded from core. Fixing that would be helpful regardless but would still leave the problem for people who actually do want to build the editor.
A more general solution would be to break up the GUI Editor into smaller modules. For example, functions required by both the editor and core could go into a separate module. Then both could include that module and core wouldn’t have to include the editor. Hopefully there are other natural splits that could lead to splitting the editor into submodules smaller than 500KB.