Good day BabylonJS community,
I have a question regarding packing project for production.
I’ve already made few projects for production using babylonJS,
The size of the bundle I’ve generated throughout my experience using
webpack or parcel bundler were roughly around 8-10Mb.
Is there any way I could make my application lighter in production?
And if there is, can anyone show me a guiding material concerning that topic.
I’ve been searching for it and could not find any step by step guide.
Do you mean size of all js folder?
Could you give a screenshot of files what you have in this folder?
I believe if you disable sourcemaps the total size will be much smaller.
Also, if you are using Inspector it may add to total size (one may use dynamic import to avoid it).
I mean just the size of main.js, the bundle that contains all the libraries needed for babylonJS to work.
I feel like I’m doing something wrong since other demo babylonjs projects need less size to operate than mine.
If by obfuscation you mean minimization, then yes, minimization can be used to reduce the bundle size (and is already done on the babylon bundle as far as I know). But other obfuscation techniques in general can increase the code size, as their main objective is making the code harder to read, not smaller