@edifice.io/vite-plugins

中文文档
2.6.14发布于 2026/11/13AGPL-3.0TypeScriptESM + CJS零依赖近 30 天下载 2352

Shared Vite plugins for Edifice frontend modules (dev proxy, local i18n serving, bootstrap cache-busting, dev entry rewriting)

原始使用文档
文档目录4 节
  1. Prerequisites
  2. Getting Started
  3. Install
  4. Exports

Edifice Vite Plugins

npm bundlephobia

Shared Vite plugins and config helpers used by Edifice frontend modules in their vite.config.ts — dev-server proxy to a recette environment, local i18n file serving, bootstrap CSS cache-busting, and dev-entry rewriting for multi-page builds. Node-only, no React dependency.

Prerequisites

  • pnpm: >= 9
  • node: >= 20

Getting Started

Install

pnpm add -D @edifice.io/vite-plugins

Exports

  • createDevProxyConfig — dev-server proxy configuration, forwarding to a recette environment when a .env file is present.
  • serveLocalI18n — serves local i18n JSON files on given routes instead of proxying them.
  • hashEdificeBootstrap / queryHashVersion — cache-busts the bootstrap CSS bundle at build time.
  • rewriteToEntry — rewrites matching dev-server routes to a custom HTML entry point (for multi-page builds).

版本与发布记录

@edifice.io/vite-plugins 共发布 21 个版本,首次发布于 2026/10/12;过去 12 个月发布了 21 个版本。

版本发布日期距今
2.6.14latest2026/11/13今天
2.6.13-develop-b2school.20261113152316develop-b2school2026/11/13今天
2.6.13-develop-pedago.20261113140442develop-pedago2026/11/13今天
2.6.13-develop-b2school.202611121605542026/11/121 天前
2.6.13-develop-b2school.202611101929142026/11/113 天前
2.6.13-develop-b2school.202611101824122026/11/113 天前

其他发布通道:develop-enabling → 2.6.12-develop-enabling.20261106141311,develop → 2.6.13-develop.20261110094922,develop-pedago → 2.6.13-develop-pedago.20261113140442,develop-b2school → 2.6.13-develop-b2school.20261113152316。

关于 @edifice.io/vite-plugins 的常见问题

@edifice.io/vite-plugins 是什么?

Shared Vite plugins for Edifice frontend modules (dev proxy, local i18n serving, bootstrap cache-busting, dev entry rewriting)

如何安装 @edifice.io/vite-plugins?

在项目目录运行 npm install @edifice.io/vite-plugins,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vite(>=5.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@edifice.io/vite-plugins 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@edifice.io/vite-plugins 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@edifice.io/vite-plugins 可以商用吗?

@edifice.io/vite-plugins 使用 AGPL-3.0 许可。最严格的 Copyleft:除分发外,通过网络向用户提供基于它的服务也需要开源对应源码。闭源 SaaS 使用前务必评估。以上为概括,不构成法律意见,请以许可原文为准。

@edifice.io/vite-plugins 的下载量有多少?

根据 npm 官方下载统计,@edifice.io/vite-plugins 在 2026/10/13 – 2026/11/11 这 30 天内被下载 2,352 次,日均约 78 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@edifice.io/vite-plugins 还在维护吗?

最新版本 2.6.14 发布于 2026/11/13(今天);至今共发布 21 个版本,其中过去 12 个月发布了 21 个;首次发布于 2026/10/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。