{"id":22562,"library":"vite-hyper-config","title":"vite-hyper-config","description":"This package enables running Vite's own configuration (vite.config.ts) through Vite itself, allowing transformation and execution of the config file with the same tool it configures. Currently at v0.9.0, it supports Vite versions 4 through 8 as peer dependencies, requires Node.js >=20.19.0, and is released frequently (multiple versions per month). Key differentiator: it uses Vite to process its own config, enabling advanced plugin-based config transformations and dependency inlining that normal Vite config loading cannot achieve.","status":"active","version":"0.9.0","language":"javascript","source_language":"en","source_url":"https://github.com/sxzz/vite-hyper-config","tags":["javascript"],"install":[{"cmd":"npm install vite-hyper-config","lang":"bash","label":"npm"},{"cmd":"yarn add vite-hyper-config","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-hyper-config","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required as a peer dependency; used to transform and run the config file.","package":"vite","optional":false}],"imports":[{"note":"Package is ESM-only. CommonJS require() will fail.","wrong":"const startVite = require('vite-hyper-config')","symbol":"startVite","correct":"import { startVite } from 'vite-hyper-config'"},{"note":"startVite is a named export, not a default export.","wrong":"import startVite from 'vite-hyper-config'","symbol":"startVite","correct":"import { startVite } from 'vite-hyper-config'"},{"note":"If only using the type, use 'import type' to avoid runtime side effects. Versions before 0.9.0 may not export this type.","wrong":"import { RunnerOptions } from 'vite-hyper-config'","symbol":"type RunnerOptions","correct":"import type { RunnerOptions } from 'vite-hyper-config'"}],"quickstart":{"code":"import { startVite } from 'vite-hyper-config'\nimport { defineConfig } from 'vite'\n\n// Run Vite with self-transforming config\nstartVite(\n  {\n    plugins: [/* plugins for your app */]\n  },\n  {\n    // Config for transforming vite.config.ts\n    plugins: []\n  },\n  {\n    deps: {\n      inline: ['@vitejs/plugin-vue']\n    }\n  }\n)","lang":"typescript","description":"Shows basic usage of startVite with three optional configuration objects: app config, hyper config (for vite.config.ts), and runner options."},"warnings":[{"fix":"Update Node.js to version 20.19.0 or later.","message":"Node.js >=20.19.0 is required; earlier versions will throw unsupported engine errors.","severity":"breaking","affected_versions":">=0.9.0"},{"fix":"Use ESM imports or set type: 'module' in package.json.","message":"The package is ESM-only and cannot be imported via CommonJS require().","severity":"breaking","affected_versions":">=0.9.0"},{"fix":"Use import { startVite } from 'vite-hyper-config'.","message":"startVite is a named export, not a default export. Using default import yields undefined.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure your project has a compatible version of vite installed.","message":"Peer dependency vite must be version 4, 5, 6, 7, or 8. Using unsupported versions will cause runtime errors.","severity":"breaking","affected_versions":">=0.9.0"},{"fix":"Always refer to the latest documentation when upgrading.","message":"The configuration options for startVite may change in future versions; check migration notes when upgrading.","severity":"deprecated","affected_versions":">=0.9.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Change to ESM import: import { startVite } from 'vite-hyper-config'","cause":"Cannot require('vite-hyper-config') because the package is ESM-only.","error":"ERR_REQUIRE_ESM: require() of ES Module not supported"},{"fix":"Use named import: import { startVite } from 'vite-hyper-config'","cause":"Using default import when only named export exists.","error":"TypeError: startVite is not a function"},{"fix":"Update Node.js to version >=20.19.0","cause":"Installed Node.js version is below 20.19.0.","error":"The engine 'node' is incompatible with this module."},{"fix":"Install vite: npm i vite","cause":"Vite is not installed as a dependency.","error":"Cannot find module 'vite'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}