Fix web player base href: /file/<project>-<version>/ with trailing slash

Without the trailing slash the browser resolves relative asset URLs
(style.css, player.js) against /file/, producing 404s. Also switch the
patch target from the obsolete /play/ scheme to the /file/ route the
API actually serves.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-28 18:49:54 +02:00
co-authored by Claude Fable 5
parent b03bc2069f
commit 5f81f7c179
+1 -1
View File
@@ -46,7 +46,7 @@ web: love
@echo "==> Patching player.js" @echo "==> Patching player.js"
sed -i.bak "s|uri = 'nogame\.love'|uri = '$(LOVE_NAME)'|g" $(WEB_DIR)/player.js && rm $(WEB_DIR)/player.js.bak sed -i.bak "s|uri = 'nogame\.love'|uri = '$(LOVE_NAME)'|g" $(WEB_DIR)/player.js && rm $(WEB_DIR)/player.js.bak
@echo "==> Patching index.html" @echo "==> Patching index.html"
sed -i.bak 's|<base href="/play/">|<base href="/play/$(PROJECT)/$(VERSION)/content/play">|g' $(WEB_DIR)/index.html && rm $(WEB_DIR)/index.html.bak sed -i.bak 's|<base href="/play/">|<base href="/file/$(PROJECT)-$(VERSION)/">|g' $(WEB_DIR)/index.html && rm $(WEB_DIR)/index.html.bak
@echo "==> Web build ready in $(WEB_DIR)" @echo "==> Web build ready in $(WEB_DIR)"
export: love web export: love web