@devvit/web

中文文档
0.15.4发布于 2026/11/17BSD-3-ClauseES Module近 30 天下载 6.5万

A central package for all your Devvit Web needs! This package provides the core functionality for building web applications with Devvit. Just bring your own framework and start building!

原始使用文档

@devvit/web

A central package for all your Devvit Web needs! This package provides the core functionality for building web applications with Devvit. Just bring your own framework and start building!

Exports

This package exports the following modules:

  • @devvit/web/server: Server-side utilities for Devvit web applications, including Redis clients, access to the Reddit API, and more.
  • @devvit/web/client: Client-side utilities for Devvit web applications, including access to our client-side context, effects, and more.
    • NOTE: If you are having difficulty importing from this package, you may need to set compilerOptions.customConditions to ["browser"] in your tsconfig.json file. (This should be done for you automatically if you used one of our starter templates.)
  • @devvit/web/shared: Shared utilities and types for Devvit web applications - usable on both the client and server.

Other packages

All the functionality in this package is also available in the following packages:

  • @devvit/client: Client-side utilities for Devvit web applications.
  • @devvit/media: Media-related utilities for Devvit web applications.
  • @devvit/realtime: Realtime communication utilities for Devvit web applications.
  • @devvit/reddit: Reddit API client for Devvit web applications.
  • @devvit/redis: Redis client for Devvit web applications.
  • @devvit/scheduler: Scheduler utilities for Devvit web applications.
  • @devvit/server: Server-side utilities for Devvit web applications.
  • @devvit/settings: Settings management utilities for Devvit web applications.
  • @devvit/shared: Shared utilities and types for Devvit web applications - usable on both the client and server.

One single @devvit/web dependency replaces all of these packages, so you can use it to build your web application without needing to install or manage multiple packages.

However, not included here is the following package:

  • @devvit/payments: Payment-related utilities for Devvit web applications. Once your app has been approved to handle payments, you can use this package to handle payments in your web application.

Sign up for Reddit's Developer Platform here!

版本与发布记录

@devvit/web 共发布 1,367 个版本,首次发布于 2025/07/25;过去 12 个月发布了 1044 个版本。

版本发布日期距今
0.15.4latest2026/11/17今天
0.15.4-next-2026-11-16-15-00-35-724c267ca6.0next2026/11/16今天
0.15.4-next-2026-11-16-10-09-38-245b6e0d04.02026/11/16今天
0.15.4-next-2026-11-13-00-22-44-7388f4042f.02026/11/133 天前
0.15.4-next-2026-11-12-22-47-19-9b8d16796b.02026/11/133 天前
0.15.4-next-2026-11-12-22-29-02-26373657c7.02026/11/133 天前

其他发布通道:0.12-next → 0.12.0-next-2025-08-13-18-11-35-04294c99a.0,0.13-next → 0.13.2-next-2026-06-02-17-42-32-e2312e1f4.0,0.14-next → 0.14.0-next-2026-08-10-14-54-33-0525c0c32.0,next → 0.15.4-next-2026-11-16-15-00-35-724c267ca6.0。

关于 @devvit/web 的常见问题

@devvit/web 是什么?

A central package for all your Devvit Web needs! This package provides the core functionality for building web applications with Devvit. Just bring your own framework and start building!

如何安装 @devvit/web?

在项目目录运行 npm install @devvit/web,或使用 pnpm add / yarn add / bun add。

@devvit/web 支持 TypeScript 吗?

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

@devvit/web 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@devvit/web 可以商用吗?

@devvit/web 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@devvit/web 的下载量有多少?

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

@devvit/web 还在维护吗?

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