I need to understand better what kind of stuff the Unity compiler puts into my webgl build, so that I can make sure to remove any redundant references that might trick the linker to include stuff I do not actually need.
I often see my build explode in growth even when I just do minor modifications, but without any kind of feedback what is included or not I am basically blind.
Is there a way to inspect what is in the generated .unityweb files? Or any other way to know what’s going on?
So you have checked your build log in the editor log? It contains a detailed list of all assets included in the build. Just open the editor log from the menu of the console window.
Keep in mind that a webGL build is in general not that “small”. The size of the build will contain not only your assets and code but also the engine itself. How large is your build? The engine itself usually has an overhead of about 3MB, but of course it depends on what modules / packages you used.