Skip to content

Deduplicate index.wasm for Godot games#83

Merged
wjt merged 1 commit intomainfrom
wjt/push-swyzpslmwkzz
Mar 18, 2026
Merged

Deduplicate index.wasm for Godot games#83
wjt merged 1 commit intomainfrom
wjt/push-swyzpslmwkzz

Conversation

@wjt
Copy link
Copy Markdown
Member

@wjt wjt commented Mar 18, 2026

This file is identical between builds, except in the case where the Godot runtime being used is updated.

Some static hosts like Netlify and Cloudflare Pages support a _redirects file, but GitHub Pages does not. So unfortunately we need to patch the index.html file in a Godot-specific way to make this work. Fortunately the structure is quite predictable, so we can do this reliably.

Resolves #11

@wjt wjt force-pushed the wjt/push-swyzpslmwkzz branch from 28dde30 to a9fafaa Compare March 18, 2026 10:05
@wjt
Copy link
Copy Markdown
Member Author

wjt commented Mar 18, 2026

Testing this locally for Threadbare, this removes 301 MB from the (uncompressed) site. Of course because the site is uploaded as a .tar.gz the saving in the compressed site will be less, but I think it's still worth having.

@wjt wjt requested a review from manuq March 18, 2026 10:12
This file is identical between builds, except in the case where the Godot
runtime being used is updated.

Some static hosts like Netlify and Cloudflare Pages support a `_redirects` file,
but GitHub Pages does not. So unfortunately we need to patch the `index.html`
file in a Godot-specific way to make this work. Fortunately the structure is
quite predictable, so we can do this reliably.

Resolves #11
@wjt wjt force-pushed the wjt/push-swyzpslmwkzz branch from a9fafaa to 9be958b Compare March 18, 2026 14:03
@wjt wjt merged commit 9be958b into main Mar 18, 2026
1 check passed
@wjt wjt deleted the wjt/push-swyzpslmwkzz branch March 18, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deduplicate common files

1 participant