From ac17c8d003764bfe1df03055be09570bd2a20425 Mon Sep 17 00:00:00 2001 From: katrinafyi <39479354+katrinafyi@users.noreply.github.com> Date: Sat, 21 Mar 2026 01:13:30 +1000 Subject: [PATCH] playground: set default LANGUAGE_BASE_URL to "." to fix subfolder hosting Previously with the empty string base URL, the playground would not work when hosted at a subfolder of the domain. This is because playground.js has this code: const url = `${LANGUAGE_BASE_URL}/tree-sitter-${newLanguageName}.wasm`; With an empty string, it would look for wasm at the root of the website and 404. Github code search shows that this is an issue which lots of people have run into, and everyone has to work around it: https://github.com/search?q=%2FLANGUAGE_BASE_URL+%3D+%22%22%2F+-language%3AHTML&type=code Related to https://www.github.com/tree-sitter/tree-sitter/issues/5230 --- crates/cli/src/playground.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cli/src/playground.html b/crates/cli/src/playground.html index 147516ac1..9805b9aeb 100644 --- a/crates/cli/src/playground.html +++ b/crates/cli/src/playground.html @@ -470,7 +470,7 @@ - +