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
muslnode 18–223 runs
build_error
glibcnode 18–223 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
createBeflyViteConfig
✓ import { createBeflyViteConfig } from 'befly-vite'
✗ const createBeflyViteConfig = require('befly-vite')
Package is ESM-only; requires import syntax. CommonJS require will fail.
default export
✓ export { default } from 'befly-vite'
No default export exists; only named exports.
type definitions
✓ import type { BeflyViteOptions } from 'befly-vite'
✗ import { BeflyViteOptions } from 'befly-vite'
Options type is exported as type only; use import type to avoid runtime error.
Minimal Vite configuration using befly-vite for a Vue 3 project.
// vite.config.js
import { createBeflyViteConfig } from 'befly-vite';
export default createBeflyViteConfig();
Errors
Common errors & fixes
SyntaxError: Cannot use import statement outside a module
Using ESM import in a CommonJS context (e.g., without `"type": "module"` in package.json).
fixAdd `"type": "module"` to package.json or rename file to .mjs.
Error [ERR_REQUIRE_ESM]: require() of ES Module
Attempting to require() the package which is ESM-only.
fixUse import syntax instead of require().
Unsupported engine: befly-vite requires bun >=1.3.0
Running npm install with Node.js or an older version of Bun.
fixInstall Bun 1.3.0+ and use `bun install`.
Audit
Dependencies
viterequiredpeer dependency, required for Vite configuration