vp-runtime-helper v1.0.10 is a Vite plugin development utility providing helper functions for writing Vite plugins. It simplifies common tasks like path manipulation, environment detection, and plugin configuration. Released under the MIT license with TypeScript types included, it targets Vite >=3.1.0 and Node >=14.18.0. Key differentiators: designed specifically for Vite plugin authors, lightweight with zero runtime dependencies, and offers a cohesive set of utilities optimized for Vite's plugin system.
npm install vp-runtime-helperVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and use the default export and two helper functions (resolveAlias, isDev) in a Vite plugin written in TypeScript.
Ensure you are using this only inside Vite plugins or hooks.
Pin the vp-runtime-helper version to a specific one that works with your Vite version, and test after upgrading Vite.
Use the recommended alternative: vprh.newHelper or update to v1.0.10 and adapt your code accordingly.
Install the package: npm install vp-runtime-helper. If using TypeScript, ensure 'esModuleInterop' is enabled in tsconfig.json, or use a default import with 'allowSyntheticDefaultImports'.
Use the correct default import: import vprh from 'vp-runtime-helper'. Then call vprh.isDev()
Check available exports in the documentation. Use named imports correctly: import { HelperFunction } from 'vp-runtime-helper'. If bundling for browser, ensure the package is compatible and not using Node.js APIs.No dependency data recorded yet.