@fullstory/babel-plugin-react-native

中文文档
1.7.2发布于 2026/10/31MITCommonJS近 30 天下载 34.7万

The official FullStory React Native babel plugin

原始使用文档
文档目录4 节
  1. Install the React Native babel plugin
  2. Note: this babel plugin is automatically installed as a dep…
  3. Enabling the React Native plugin
  4. babel.config.js Example

Fullstory React Native Babel Plugin

CircleCI

Fullstory's React Native babel plugin performs transformations to enable Fullstory privacy state declarations on all React Native controls, in addition to adding support for capturing click events.

This plugin does not replace @fullstory/babel-plugin-annotate-react, which annotates React components with stable attributes to help with element identity.

This plugin should only be used in conjunction with @fullstory/react-native.

This plug-in is intended to be used in conjunction with Fullstory for Mobile Apps. For more information, please see this getting started guide. Email [email protected] for additional help.

Install the React Native babel plugin

Note: this babel plugin is automatically installed as a dependency to @fullstory/react-native

with npm

npm i @fullstory/babel-plugin-react-native --save

with yarn

yarn add @fullstory/babel-plugin-react-native

Enabling the React Native plugin

The Fullstory React Native babel plugin is required to be enabled in order for Fullstory to fully work with React Native.

babel.config.js Example

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: ['@fullstory/react-native'],
};

版本与发布记录

@fullstory/babel-plugin-react-native 共发布 28 个版本,首次发布于 2020/04/09;过去 12 个月发布了 8 个版本。

版本发布日期距今
1.7.2latest2026/10/3116 天前
1.7.12026/08/262 个月前
1.7.02026/07/084 个月前
1.6.42026/04/226 个月前
1.6.32026/04/147 个月前
1.6.22026/04/087 个月前

关于 @fullstory/babel-plugin-react-native 的常见问题

@fullstory/babel-plugin-react-native 是什么?

The official FullStory React Native babel plugin

如何安装 @fullstory/babel-plugin-react-native?

在项目目录运行 npm install @fullstory/babel-plugin-react-native,或使用 pnpm add / yarn add / bun add。

@fullstory/babel-plugin-react-native 支持 TypeScript 吗?

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

@fullstory/babel-plugin-react-native 支持 ESM 还是 CommonJS?

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

@fullstory/babel-plugin-react-native 可以商用吗?

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

@fullstory/babel-plugin-react-native 的下载量有多少?

根据 npm 官方下载统计,@fullstory/babel-plugin-react-native 在 2026/10/16 – 2026/11/14 这 30 天内被下载 347,479 次,日均约 11,583 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fullstory/babel-plugin-react-native 还在维护吗?

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