Skip to main content

devtools-json

The devtools-json add-on adds a handle hook that responds to the /.well-known/appspecific/com.chrome.devtools.json request with a 404 (aka "Go away, Chrome DevTools!") during development, preventing the notice in your server logs.

Alternatives

If you'd prefer to disable the feature in your browser instead, you can do this in Chrome by visiting chrome://flags and disabling the "DevTools Project Settings". You may also be interested in disabling "DevTools Automatic Workspace Folders" since it's closely related.

If you want to enable the workspaces feature instead, you can install vite-plugin-devtools-json, which is a Vite plugin for generating the project settings file on-the-fly in the development server:

vite.config
import import devtoolsJsondevtoolsJson from 'vite-plugin-devtools-json';
import { function sveltekit(): Promise<Plugin<any>[]>

Returns the SvelteKit Vite plugins.

sveltekit
} from '@sveltejs/kit/vite';
import { function defineConfig(config: UserConfig): UserConfig (+5 overloads)

Type helper to make it easier to use vite.config.ts accepts a direct {@link UserConfig } object, or a function that returns it. The function receives a {@link ConfigEnv } object.

defineConfig
} from 'vite';
export default function defineConfig(config: UserConfig): UserConfig (+5 overloads)

Type helper to make it easier to use vite.config.ts accepts a direct {@link UserConfig } object, or a function that returns it. The function receives a {@link ConfigEnv } object.

defineConfig
({
UserConfig.plugins?: PluginOption[] | undefined

Array of vite plugins to use.

plugins
: [function sveltekit(): Promise<Plugin<any>[]>

Returns the SvelteKit Vite plugins.

sveltekit
(), import devtoolsJsondevtoolsJson()]
});

Installing the plugin enables the feature for all users connecting to the dev server with a Chromium browser, and allows the browser to read and write all files within the directory. If you are using Chrome's AI Assistance feature, this may also result in data being sent to Google.

Usage

npx sv add devtools-json

What you get

  • A handleDevtoolsJson handle function added to your hooks.server file

Edit this page on GitHub llms.txt

previous next