{"id":22637,"library":"vite-plugin-devtools","title":"vite-plugin-devtools","description":"Vite plugin that integrates mobile debugging tools (vConsole and Eruda) into your Vite dev server. Version 0.4.0 released as a lightweight wrapper; no active maintenance or recent updates. Key differentiator: simple toggle-based inclusion of popular dev consoles without manual script injection, suitable for development builds only.","status":"active","version":"0.4.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","vite","vite-plugin","typescript"],"install":[{"cmd":"npm install vite-plugin-devtools","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-devtools","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-devtools","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only; CommonJS require will fail in Vite config.","wrong":"const devtools = require(\"vite-plugin-devtools\");","symbol":"default","correct":"import devtools from \"vite-plugin-devtools\";"},{"note":"Default export, not named.","wrong":"","symbol":"devtools","correct":"import devtools from \"vite-plugin-devtools\";"},{"note":"vConsole is a config option, not an export.","wrong":"import { vConsole } from \"vite-plugin-devtools\";","symbol":"vConsole","correct":"import devtools from \"vite-plugin-devtools\";"}],"quickstart":{"code":"// vite.config.js\nimport { defineConfig } from \"vite\";\nimport devtools from \"vite-plugin-devtools\";\n\nexport default defineConfig({\n  plugins: [\n    devtools({\n      vconsole: true,\n    }),\n  ],\n});\n","lang":"javascript","description":"Shows basic setup with vConsole enabled. Plugin automatically injects devtools script in development."},"warnings":[{"fix":"No action needed for production; verify dev mode only.","message":"Plugin only works in development mode; production builds strip it out automatically.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Stick with vconsole option if stability is needed.","message":"eruda option is experimental and may be removed in future versions.","severity":"deprecated","affected_versions":">=0.4.0"},{"fix":"Enable only one devtool at a time or test for conflicts.","message":"Using both vconsole and eruda simultaneously may cause conflicts.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run npm install vite-plugin-devtools and ensure vite.config.js uses ESM (type: module or .mjs).","cause":"Package not installed or ESM import used incorrectly with CommonJS.","error":"Error: Cannot find module 'vite-plugin-devtools'"},{"fix":"Use import devtools from \"vite-plugin-devtools\" (default import).","cause":"Default import mistakenly treated as named import or CommonJS require without default property.","error":"devtools is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}