@builder.io/sdk-vue

中文文档
5.4.2发布于 2026/10/20ESM + CJS构建来源已验证近 30 天下载 2.8万

Builder.io SDK for Vue

原始使用文档
文档目录8 节
  1. Minimum supported version
  2. Getting Started
  3. CSS
  4. Mitosis
  5. Feature Support
  6. Fetch
  7. Version Support
  8. Usage

Builder.io Vue SDK

This is Builder's Gen2 Vue SDK.

Minimum supported version

The peerDependencies permit Vue >=3; Vue 2 is outside the installation range. The E2E-tested minimum is Vue 3.3.9; see the framework version matrix.

Getting Started

npm install @builder.io/sdk-vue

NOTE: if you are using Nuxt, you will need to add the SDK's Nuxt module in nuxt.config.js:

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  modules: ['@builder.io/sdk-vue/nuxt'],
});

CSS

If you are using a SSR framework other than Nuxt, you will need to manually import the CSS by adding the following to your entrypoint, before rendering Builder Content:

<script>
  import '@builder.io/sdk-vue/css';
</script>

Mitosis

This SDK is generated by Mitosis. To see the Mitosis source-code, go here.

Feature Support

To check the status of the SDK, look at these tables.

Fetch

This Package uses fetch. See these docs for more information.

Version Support

This SDK supports standalone Vue 3, or using Nuxt 3.

Usage

You can see examples of using Builder.io:

  • with Vue 3 here
  • with Nuxt 3 here
  • with Nuxt 3 (using a catch-all route) here

版本与发布记录

@builder.io/sdk-vue 共发布 294 个版本,首次发布于 2021/08/19;过去 12 个月发布了 27 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
5.4.2latest2026/10/2019 天前
5.4.12026/10/061 个月前
5.4.02026/10/051 个月前
5.3.02026/10/021 个月前
5.2.162026/09/301 个月前
5.2.152026/09/291 个月前

其他发布通道:vue2-lts → 0.12.1-vue2-lts-0,dev → 5.0.0-2,v4-lts → 4.2.4-next.0。

关于 @builder.io/sdk-vue 的常见问题

@builder.io/sdk-vue 是什么?

Builder.io SDK for Vue

如何安装 @builder.io/sdk-vue?

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

@builder.io/sdk-vue 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/builder.io__sdk-vue 是否存在。

@builder.io/sdk-vue 支持 ESM 还是 CommonJS?

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

@builder.io/sdk-vue 可以商用吗?

@builder.io/sdk-vue 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@builder.io/sdk-vue 的下载量有多少?

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

@builder.io/sdk-vue 还在维护吗?

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