Minimizing custom build bundle size

I’m trying to create a simple rotating logo that’ll sit on top of an html page. I was able to get the bundle size down to 1.5 MB (357.75 KB gzipped), using webpack w/chunk splitting, but I wonder if it can’t be decreased further for a simple scene like this.

I’m certainly not a Node.js developer. Had some help from one, but we’re both new to babylon.js and this is as far as we’ve gotten.

This is a draft of what I’m doing, with everything I’ll be using in terms of code (design obviously not final).

For the build:
src/min-babylon.ts
package.json (tried a couple of other bundlers, but only the webpack stuff is relevant)
webpack.config.js

Also, the webpack bundle analyzer report.
One strange thing… without the chunk splitting, the single-file build is (1.8 MB). The current chunk splitting config produces some 33 chunks, but only 5 are actually used - those are the ones that add up to 1.5.

Any strategies I could pursue to make the thing smaller?
You’ll notice that the scene itself is extremely simple - there aren’t even any lights (textures are emissive), etc.

If you/partner are savvy and can move away from webpack. I recommend Vite or rolldown-Vite, both alr include rollup. I think for your use case, Vite should be sufficient. Rolldown version might be overkill. Bjs vite doc: Babylon.js docs

You can try this:
a) clone your project to another directory, so your webpack version is untouched and acts as a fallback.
b) install vite, integrate and build, compare the build result against yr webpack version. Even better if you can move to es6 and use tree-shaking, import only what you need in bjs.

Hope it helps.