{"id":42224,"library":"vite-plugin-eruda","title":"vite-plugin-eruda","description":"A Vite plugin that automatically loads the Eruda mobile debugging console in development mode. Version 1.0.1 is the latest stable release. It simplifies integration by conditionally injecting Eruda based on the environment (NODE_ENV or a 'debug' option). Unlike manual Eruda setup, this plugin handles ESM imports and Vite configuration seamlessly. Ships TypeScript types. Low maintenance; simple API with one main export.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript"],"install":[{"cmd":"npm install vite-plugin-eruda","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-eruda","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-eruda","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides the actual debugging toolkit injected by the plugin","package":"eruda","optional":false}],"imports":[{"note":"This plugin uses a default export.","wrong":"import { eruda } from 'vite-plugin-eruda'","symbol":"eruda","correct":"import eruda from 'vite-plugin-eruda'"},{"note":"In CommonJS, require the default export.","wrong":"const { eruda } = require('vite-plugin-eruda')","symbol":"vite-plugin-eruda","correct":"const eruda = require('vite-plugin-eruda')"},{"note":"Types are bundled; Options is not exported. Use default import for type inference.","wrong":"import type { Options } from 'vite-plugin-eruda'","symbol":"vite-plugin-eruda types","correct":"// types are included"}],"quickstart":{"code":"// vite.config.js\nimport { defineConfig } from 'vite';\nimport eruda from 'vite-plugin-eruda';\n\nexport default defineConfig({\n  plugins: [\n    eruda()\n  ]\n});","lang":"javascript","description":"Shows how to register the plugin in Vite config to automatically load Eruda in development."},"warnings":[{"fix":"Set 'debug' to true explicitly to force loading, or omit it for default behavior.","message":"The 'debug' option defaults to undefined, meaning process.env.NODE_ENV !== 'production' is used. If you set it to false, Eruda will not load even in development.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use a custom script to dynamically import eruda and configure it before calling eruda.init().","message":"Eruda is loaded asynchronously; the plugin does not wait for it to be ready. If you need to configure Eruda before it loads, you must do it outside the plugin.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure the plugin is only applied in client-side builds (e.g., using ssr: false in vite config).","message":"The plugin only injects Eruda in the browser; it does not work in Node.js SSR contexts.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.1':20 'api':62 'automat':9 'base':33 'condit':30 'configur':54 'consol':15 'debug':14,41 'develop':17 'env':38 'environ':36 'eruda':4,12,32,45 'esm':50 'export':66 'handl':49 'import':51 'inject':31 'integr':28 'javascript':67 'latest':23 'load':10 'low':59 'main':65 'mainten':60 'manual':44 'mobil':13 'mode':18 'node':37 'one':64 'option':42 'plugin':3,7,48 'releas':25 'seamless':55 'setup':46 'ship':56 'simpl':61 'simplifi':27 'stabl':24 'type':58 'typescript':57,68 'unlik':43 'version':19 'vite':2,6,53 'vite-plugin-eruda':1","created_at":"2026-06-04T18:56:13.443341+00:00","updated_at":"2026-06-04T18:56:13.443341+00:00","problems":[{"fix":"Run 'npm install vite-plugin-eruda' or 'yarn add vite-plugin-eruda'.","cause":"Package not installed or incorrect import path.","error":"Cannot find module 'vite-plugin-eruda'"},{"fix":"Use 'import eruda from 'vite-plugin-eruda'' instead of '{ eruda }'.","cause":"Incorrect import syntax (named import instead of default).","error":"Uncaught TypeError: eruda is not a function"},{"fix":"Run 'vite' (dev server) and access the page from a mobile device. If still missing, check browser console for errors.","cause":"The plugin only loads in development; production builds skip it. Also ensure the debug option is not set to false.","error":"Eruda not appearing on mobile device"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"vite-plugin-eruda","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}