Registry / devops / vite-hyper-config

vite-hyper-config

JSON →
library0.9.0jsnpmunverified

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.

npm install vite-hyper-config
INSTALL
IMPORT
SIG · VITE-HYPER-CONFIG
V
vite-hyper-config
devopsjavascriptv0.9.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

startVite
import { startVite } from 'vite-hyper-config'
const startVite = require('vite-hyper-config')
Package is ESM-only. CommonJS require() will fail.
startVite
import { startVite } from 'vite-hyper-config'
import startVite from 'vite-hyper-config'
startVite is a named export, not a default export.
type RunnerOptions
import type { RunnerOptions } from 'vite-hyper-config'
import { RunnerOptions } from 'vite-hyper-config'
If only using the type, use 'import type' to avoid runtime side effects. Versions before 0.9.0 may not export this type.

Shows basic usage of startVite with three optional configuration objects: app config, hyper config (for vite.config.ts), and runner options.

import { startVite } from 'vite-hyper-config' import { defineConfig } from 'vite' // Run Vite with self-transforming config startVite( { plugins: [/* plugins for your app */] }, { // Config for transforming vite.config.ts plugins: [] }, { deps: { inline: ['@vitejs/plugin-vue'] } } )
Debug
Known issues
breakingNode.js >=20.19.0 is required; earlier versions will throw unsupported engine errors.
fix
Update Node.js to version 20.19.0 or later.
affects: >=0.9.0
breakingThe package is ESM-only and cannot be imported via CommonJS require().
fix
Use ESM imports or set type: 'module' in package.json.
affects: >=0.9.0
gotchastartVite is a named export, not a default export. Using default import yields undefined.
fix
Use import { startVite } from 'vite-hyper-config'.
affects: all
breakingPeer dependency vite must be version 4, 5, 6, 7, or 8. Using unsupported versions will cause runtime errors.
fix
Ensure your project has a compatible version of vite installed.
affects: >=0.9.0
deprecatedThe configuration options for startVite may change in future versions; check migration notes when upgrading.
fix
Always refer to the latest documentation when upgrading.
affects: >=0.9.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module not supported
Cannot require('vite-hyper-config') because the package is ESM-only.
fix
Change to ESM import: import { startVite } from 'vite-hyper-config'
TypeError: startVite is not a function
Using default import when only named export exists.
fix
Use named import: import { startVite } from 'vite-hyper-config'
The engine 'node' is incompatible with this module.
Installed Node.js version is below 20.19.0.
fix
Update Node.js to version >=20.19.0
Cannot find module 'vite'
Vite is not installed as a dependency.
fix
Install vite: npm i vite
Upgrade
Version history
0.9.0latest on npm
Audit
Dependencies
viterequiredRequired as a peer dependency; used to transform and run the config file.
Agent activity
4 hits · last 30 days
node
4
Resources
vite-hyper-config — npm install vite-hyper-config · libregistry