@callstack/repack-plugin-expo-modules

中文文档
5.4.3发布于 2026/11/04MITTypeScriptCommonJS零依赖构建来源已验证近 30 天下载 3.2万

A plugin for @callstack/repack that integrates Expo Modules

原始使用文档
文档目录6 节
  1. A toolkit to build your React Native application with Rspac…
  2. About
  3. Installation
  4. Usage
  5. Plugin
  6. Made with ❤️ at Callstack
Re.Pack

A toolkit to build your React Native application with Rspack or Webpack.

mit licence npm downloads Chat PRs Welcome

@callstack/repack-plugin-expo-modules is a plugin for @callstack/repack that compliments the integration of Expo Modules into your React Native projects.

About

This plugin helps and compliments the process of enabling Expo Modules in Re.Pack projects by defining necessary globals that are expected by Expo Modules at runtime. However, it is not sufficient on its own for a complete setup. For comprehensive guidance on using Expo Modules with Re.Pack, please refer to our official documentation.

Installation

npm install -D @callstack/repack-plugin-expo-modules

Usage

Plugin

To add the plugin to your Re.Pack configuration, update your rspack.config.js or webpack.config.js as follows:

import { ExpoModulesPlugin } from "@callstack/repack-plugin-expo-modules";

export default (env) => {
  // ...
  return {
    // ...
    plugins: [
      // ...
      new ExpoModulesPlugin(),
    ],
  };
};

Check out our website at https://re-pack.dev for more info and documentation or our GitHub: https://github.com/callstack/repack.

Made with ❤️ at Callstack

@callstack/repack is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. Callstack is a group of React and React Native geeks, contact us at [email protected] if you need any help with these or just want to say hi!

Like the project? ⚛️ Join the team who does amazing stuff for clients and drives React Native Open Source! 🔥

版本与发布记录

@callstack/repack-plugin-expo-modules 共发布 57 个版本,首次发布于 2025/01/28;过去 12 个月发布了 26 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
5.4.3latest2026/11/044 天前
5.4.3-canary-20261104085523canary2026/11/045 天前
5.4.3-canary-202611031705202026/11/045 天前
5.4.3-canary-202611031556052026/11/045 天前
5.4.3-canary-202610221720592026/10/2317 天前
5.4.3-canary-202610220910092026/10/2218 天前

其他发布通道:rc → 5.1.0-rc.0,canary → 5.4.3-canary-20261104085523。

关于 @callstack/repack-plugin-expo-modules 的常见问题

@callstack/repack-plugin-expo-modules 是什么?

A plugin for @callstack/repack that integrates Expo Modules

如何安装 @callstack/repack-plugin-expo-modules?

在项目目录运行 npm install @callstack/repack-plugin-expo-modules,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@callstack/repack(^5.4.3)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@callstack/repack-plugin-expo-modules 支持 TypeScript 吗?

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

@callstack/repack-plugin-expo-modules 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@callstack/repack-plugin-expo-modules 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@callstack/repack-plugin-expo-modules 可以商用吗?

@callstack/repack-plugin-expo-modules 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@callstack/repack-plugin-expo-modules 的下载量有多少?

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

@callstack/repack-plugin-expo-modules 还在维护吗?

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