HTML5 Export Zip Adding Tons of Files

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By scrubswithnosleeves

Hey All,

Godot 3.2.3 stabel | Mac OS, Big Sur

Exporting my second game for html5 and I am getting an error upon trying to upload to itch.io that there are too many files in the export zip. 1949 files to be exact.

I have less than 300 total files in the project folder and <160MB before compression. So when I compress it, it is somehow adding over 1600 files???

Can someone explain this to me? I didn’t have this problem with my last game and it had more files and a larger file size. Is it something with my operating system or compression algorithm?

:bust_in_silhouette: Reply From: scrubswithnosleeves

Don’t know why this worked, but it worked:

When exporting from Godot for html5, export as a .zip file OUTSIDE of your project folder. Then unzip/expand that file. Then go export the game as a .html inside of that expanded .zip file. Finally, recompress/zip that file.

This file was unbelievably small (15 MB vs 108 MB) in comparison to just exporting to a .html inside the project folder and compressing it myself. No idea why.

You don’t want to ZIP your entire project folder for distribution, as it will contain your source files but also imported files which are located in the hidden .import/ directory.

Calinou | 2020-12-02 17:33