Most Minimal Web Export (Build Config?)

Godot Version

4.4.1

Question

Hey yall - I’m a web dev but new to Godot and I recently made a project and exported it to the web target. The good news is the project is totally working with the default export config. However I noticed it created a lot of pre-generated files. Some of these make sense to remove (for example things like images for the favicon or loading screen) but I’m more interested in understanding the most minimal setup so I can use my exported game in a framework I prefer to work in (in this case React). I noticed the wasm file but there also seems to be an index.pck file which I’m not sure the purpose of. Also the index.js generated with the export seems to have a ton of functions and is several thousands lines of code long - which I’m not sure are all relevant or I’ll ever totally understand. Further I’ve noticed theres an audio worklet js file for sound. My question is - is there any guides or explanations or SDKs to create the game as minimally as possible. For example - my game has no sound - is there a way to completely disable the audio worklet to save on some lines of code? Or what about this giant minified chunk of code at the top of index.js - what does it do? What if I want to use Typescript?

Any help/resources would be greatly appreciated! Thank you.


The pck file is the file where all your assets are located. More info here Exporting packs, patches, and mods — Godot Engine (stable) documentation in English

Check these documentation pages for more info about html5 exports Custom HTML page for Web export — Godot Engine (stable) documentation in English and HTML5 shell class reference — Godot Engine (stable) documentation in English

You’ll need to build from source your own export templates if you want to remove some features of the engine. This is an advanced topic. More info here Building from source — Godot Engine (stable) documentation in English, Compiling for the Web — Godot Engine (stable) documentation in English, and Optimizing a build for size — Godot Engine (stable) documentation in English

1 Like

Those second and third links were exactly what I was looking for - thank you!