Registry / web-framework / vite-plugin-devtools-json

vite-plugin-devtools-json

JSON →
library1.0.0jsnpmunverified

Vite plugin (v1.0.0) that generates the Chrome DevTools project settings file (com.chrome.devtools.json) on-the-fly in the dev server. It enables seamless integration with DevTools features like project settings and automatic workspace folders. The plugin serves a JSON endpoint at /.well-known/appspecific/com.chrome.devtools.json providing workspace root and UUID. Supports Vite 5, 6, and 7. Key differentiators: on-demand generation without build step, built-in UUID management, and Windows container path normalization for WSL/Docker Desktop. Written in TypeScript with type declarations.

npm install vite-plugin-devtools-json
INSTALL
IMPORT
SIG · VITE-PLUGIN-DEVTOO
V
vite-plugin-devtools-json
web-frameworkjavascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import devtoolsJson from 'vite-plugin-devtools-json'
const devtoolsJson = require('vite-plugin-devtools-json')
Default export; CommonJS require not supported as plugin ships ESM only.
type VitePluginDevToolsOptions
import type { VitePluginDevToolsOptions } from 'vite-plugin-devtools-json'
import { VitePluginDevToolsOptions } from 'vite-plugin-devtools-json'
Options type is exported; use 'import type' for compile-time only usage.
Plugin
import devtoolsJson from 'vite-plugin-devtools-json'; export default defineConfig({ plugins: [devtoolsJson()] })
import { devtoolsJson } from 'vite-plugin-devtools-json'
The function is the default export, not a named export.

Basic Vite config with all plugin options enabled and a fixed UUID.

// vite.config.ts import { defineConfig } from 'vite'; import devtoolsJson from 'vite-plugin-devtools-json'; export default defineConfig({ plugins: [ devtoolsJson({ uuid: '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b', projectRoot: '/path/to/project', normalizeForWindowsContainer: true }) ] });
Debug
Known issues
deprecated'normalizeForChrome' option is deprecated. Use 'normalizeForWindowsContainer' instead.
fix
Replace 'normalizeForChrome' with 'normalizeForWindowsContainer'.
affects: >=1.0.0
gotchaThe UUID is auto-generated on first dev server start and cached in Vite cache. Changing the cache will generate a new UUID.
fix
To persist UUID, pass a fixed uuid in options.
affects: >=1.0.0
gotchaThe plugin only works with Vite 5, 6, or 7. Older versions are not supported.
fix
Ensure Vite version is ^5.0.0 || ^6.0.0 || ^7.0.0.
affects: >=1.0.0
gotchaThe projectRoot must be an absolute path. Relative paths will cause incorrect workspace root in DevTools.
fix
Use path.resolve(__dirname, '..') or an absolute path string.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'vite-plugin-devtools-json'
Package not installed or missing from node_modules.
fix
Run 'npm install -D vite-plugin-devtools-json'
'devtoolsJson' is not a function
Using named import instead of default import.
fix
Use 'import devtoolsJson from 'vite-plugin-devtools-json''
Plugin only works with Vite 5, 6, or 7
Installed Vite version mismatch.
fix
Update Vite to ^5.0.0, ^6.0.0, or ^7.0.0
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
viterequiredRequired as peer dependency; plugin only works with Vite 5, 6, or 7.
Agent activity
6 hits · last 30 days
node
4
OpenAI (training)
2
Resources
vite-plugin-devtools-json — npm install vite-plugin-devtools-json · libregistry