Due to the amount of .js files that are generated on export (specifically web), I need to find a way to bundle them together without having to manually copy and paste each one’s contents.
Having 300+ files from extensions alone causes problems when loading games, and prevents you from uploading the projects in places such as itch.io.
I have tried using bundlers such as Vite,
webpack and parcel. None have worked for me to this point, due to how a gdevelop web export is structured.
Has anyone in here successfully found a solution to the issue?
For your own website you would upload the “web” folder directly. For itch.io or similar, put the folder in a .zip file and upload that.
That’s not quite my question.
I know to put the files in a zip folder on itch.io, but the issue is that there is a file limit on the zip folder of 1000 files.
Also I made a typo, I meant 800, not 300
Ah, I forgot about that restriction… I wonder if you could ask the itch staff for an exception?
How many extensions and effects are you using? All of mine seem to use around 1 to 3 files each. Is there one in particular with a ton of files?
Can you pare down something else… such as icons which are not needed for web?
I shrunk down to the max a while ago. Got rid of images and sounds until i got them down to around 100.
I’m over by 17 files.
Wait, I just realized that some extensions use a lot more files, which are in the main folder instead of organized into Extensions folder. ArrayTools alone has 95 files 
Kind of my point. if you use a dozen or so extensions, you drastically increase the number of files in your project, making loading particularly painful on web.
I have found a solution to the issue that I was dealing with. You use Grunt JS to concatenate all of the external extension JS files.
Here’s a tutorial about grunt JS that I found.
This basically addressed a lot of the issues tied to making a game web viable.
1 Like
Note to others: There’s still very much a need for a way to automate the concatenation of external extensions, as they can genuinely increase the size of a project exponentially if not properly dealt with.
Good to know, I thought maybe there would be errors from trying to include missing files?
I guess I forgot to add the detail that I removed the links to the external extensions and placed a link to the big JS file.
1 Like