Registry / web-framework / befly-vite

befly-vite

JSON →
library1.6.0jsnpmunverified

Befly Vite 配置预设和插件集合,专为 Vue 3 项目优化,提供开箱即用的 Vite 配置。当前版本 1.6.0,活跃开发中。集成了常用插件(路由、自动导入、图标等)、优化的构建配置(分包、压缩、分析),并支持自定义扩展。与 Vue 3 和 Vite 深度集成,适合快速搭建 Vue 3 项目。注意:需要 Bun >= 1.3.0 作为运行时。

npm install befly-vite
INSTALL
IMPORT
SIG · BEFLY-VITE
B
befly-vite
web-frameworkjavascriptv1.6.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.

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();
Debug
Known issues
gotchaPackage requires Bun >=1.3.0; Node.js is not supported.
fix
Install Bun 1.3.0 or later and use `bun` command instead of `node`.
affects: >=1.0.0
breakingESM-only package; CommonJS require() will throw a runtime error.
fix
Use ES module import syntax; set `"type": "module"` in package.json or use .mjs extension.
affects: >=1.0.0
gotchaAutomatic exclusion of `**/components/**` from befly-admin-ui views routing may cause missing routes.
fix
If using befly-admin-ui, ensure view files are not under components directory; override exclusion in custom config if needed.
affects: >=1.0.0
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).
fix
Add `"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.
fix
Use 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.
fix
Install Bun 1.3.0+ and use `bun install`.
Upgrade
Version history
1.6.0latest on npm
Audit
Dependencies
viterequiredpeer dependency, required for Vite configuration
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
befly-vite — npm install befly-vite · libregistry