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:
@@ -46,7 +46,7 @@ web: love
|
||||
@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
|
||||
@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)"
|
||||
|
||||
export: love web
|
||||
|
||||
Reference in New Issue
Block a user