Babylon.JS Editor Build Size

Building just the default scene, which is a cube, a ground plane, and a skybox, appears to result in a 25.4 MB build (the size of the 2 files in the dist/ directory). This is humongous, even when compared to something like Unity.

Is there a way to shrink that build size?
What all is being included that contributes to such a large build?

Maybe you could try importing only what you are using in your code.

For example
import { Engine } from “@babylonjs/core/Engines/engine”;
import { Scene } from “@babylonjs/core/scene”;
import { ArcRotateCamera } from “@babylonjs/core/Cameras/arcRotateCamera”;
import { Vector3 } from “@babylonjs/core/Maths/math.vector”;

Hope this helps.

I would expect the Editor to ‘strip’ out unused stuff automatically when making a production build, or have some option to do so.

Sorry did not notice it was editor related, add @julien-moreau the editor daddy :slight_smile: