Skip to content

Commit 803ce3a

Browse files
committed
print link to vite plugin
1 parent fd828d7 commit 803ce3a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/kit/src/runtime/server/respond.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ const page_methods = new Set(['GET', 'HEAD', 'POST']);
5151

5252
const allowed_page_methods = new Set(['GET', 'HEAD', 'OPTIONS']);
5353

54+
let warned_on_devtools_json_request = false;
55+
5456
/**
5557
* @param {Request} request
5658
* @param {import('types').SSROptions} options
@@ -577,6 +579,14 @@ export async function respond(request, options, manifest, state) {
577579
// causing console spam. If users want to serve this file they can install
578580
// https://github.com/ChromeDevTools/vite-plugin-devtools-json
579581
if (DEV && event.url.pathname === '/.well-known/appspecific/com.chrome.devtools.json') {
582+
if (!warned_on_devtools_json_request) {
583+
console.warn(
584+
`\nGoogle Chrome is requesting ${event.url.pathname} to automatically configure devtools project settings. To serve this file, add this plugin to your Vite config:\n\nhttps://github.com/ChromeDevTools/vite-plugin-devtools-json\n`
585+
);
586+
587+
warned_on_devtools_json_request = true;
588+
}
589+
580590
return new Response(undefined, { status: 404 });
581591
}
582592

0 commit comments

Comments
 (0)