-
-
Save kziemski/e2aef30db7e5e0c1e326c00229cccdf4 to your computer and use it in GitHub Desktop.
Astro .well-known/appspecific/com.chrome.devtools.json.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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