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.
npm install vite-plugin-erudaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to register the plugin in Vite config to automatically load Eruda in development.
Set 'debug' to true explicitly to force loading, or omit it for default behavior.
Use a custom script to dynamically import eruda and configure it before calling eruda.init().
Ensure the plugin is only applied in client-side builds (e.g., using ssr: false in vite config).
Run 'npm install vite-plugin-eruda' or 'yarn add vite-plugin-eruda'.
Use 'import eruda from 'vite-plugin-eruda'' instead of '{ eruda }'.Run 'vite' (dev server) and access the page from a mobile device. If still missing, check browser console for errors.