Skip to content

Instantly share code, notes, and snippets.

@JLarky
Created July 15, 2025 20:30
Show Gist options
  • Save JLarky/1ef11eafbc97501fa74652095f61fa36 to your computer and use it in GitHub Desktop.
Save JLarky/1ef11eafbc97501fa74652095f61fa36 to your computer and use it in GitHub Desktop.
Astro .well-known/appspecific/com.chrome.devtools.json.ts
// put this in src/pages/.well-known/appspecific/com.chrome.devtools.json.ts
import type { APIRoute } from "astro"
import { join } from "node:path"
// https://chromium.googlesource.com/devtools/devtools-frontend/+/main/docs/ecosystem/automatic_workspace_folders.md
export const GET: APIRoute = () => {
return new Response(
JSON.stringify({
"workspace": {
"root": join(import.meta.dirname, "../../../../../.."),
// run crypto.randomUUID() and store your new value so it's not all the same
"uuid": "ae98d3b5-527a-498f-a438-49405733ddab"
}
}),
{
headers: {
"Content-Type": "application/json"
}
}
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment