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.
