npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@expo-harmony/expo-dev-launcher

v57.0.21-harmony.1

Published

HarmonyOS port of expo-dev-launcher

Readme

@expo-harmony/expo-dev-launcher

GitHub 仓库 | 官方文档

为 HarmonyOS 上的 React Native 应用提供 Expo Dev Launcher 的原生实现,与官方 expo-dev-launcher 配套使用。

安装

本包适配 Expo SDK 57。

引入本包前,需要确保应用使用的 HarmonyOS SDK 至少为 API 13(HarmonyOS 5.0.1)。

npm install @expo-harmony/expo-dev-launcher expo-dev-launcher@~57.0.21

API 对照表

Methods

devLauncher(options?)

类型化插件入口,参数为 PluginConfigType,返回 Expo 配置插件元组 ['@expo-harmony/expo-dev-launcher', options]。通过 @expo-harmony/expo-dev-launcher/plugin 导入。

Types

PluginConfigOptions

HarmonyOS 启动器配置项:

  • launchMode?: 'most-recent' | 'launcher':启动时先尝试最近项目,失败后使用 defaultLaunchURL;launcher 跳过最近项目。默认 most-recent。
  • launchModeExperimental?: 'most-recent' | 'launcher':launchMode 的弃用别名。
  • defaultLaunchURL?: string:默认项目地址,支持 HTTP(S)、exp(s) 地址及开发客户端链接;不能包含登录凭据或 URL fragment。
  • toolsButton?: boolean:浮动工具按钮的初始显示状态。
  • embeddedBundle?: boolean:是否显示加载内置 bundle 的入口;启用时应用需提供内置 JavaScript bundle。
  • skipOnboarding?: boolean:是否跳过启动器引导。
  • showMenuAtLaunch?: boolean:是否在启动时打开开发菜单。

上述布尔值用于设置初始状态;用户保存的设置优先。

PluginConfigType

插件配置类型。选项可放在顶层,或放在 harmony 对象中;同名的 harmony 选项优先。

Permissions

注册插件后,HarmonyOS 应用清单会声明 ohos.permission.INTERNET,用于连接开发服务器和加载开发项目。

插件配置

@expo-harmony/expo-dev-client 的配置插件会调用本包的插件。单独使用 Dev Launcher 时,请在 Expo 配置中注册本包的插件。

{
  "expo": {
    "plugins": [
      [
        "@expo-harmony/expo-dev-launcher",
        {
          "launchMode": "launcher",
          "toolsButton": true
        }
      ]
    ],
    "harmony": {
      "bundleName": "com.example.app"
    }
  }
}

launchMode 可设为 most-recent(默认)或 launcher。前者先尝试打开最近项目,失败后再尝试 defaultLaunchURL;后者跳过最近项目,直接尝试默认地址。未设置默认地址或加载失败时会停留在启动器。defaultLaunchURL 支持 HTTP(S)、exp(s) 地址和开发客户端链接,不能包含登录凭据或 URL fragment。

toolsButton、skipOnboarding 和 showMenuAtLaunch 分别控制浮动工具按钮、是否跳过引导和是否在启动时打开菜单。用户保存的设置优先于这些默认值。

设为 embeddedBundle: true 后,启动器会显示“Load embedded bundle”。使用此功能时,应用需要提供内置 JavaScript bundle。内置项目不会保存到最近项目列表。

也可以在 TypeScript 配置中注册插件:

import devLauncher from '@expo-harmony/expo-dev-launcher/plugin';

export default { plugins: [devLauncher({ launchMode: 'launcher', skipOnboarding: true })] };

启动器

启动器会列出最近打开的项目和局域网内发现的开发服务,也可手动输入项目地址或扫码。失效的服务会从列表中移除,用户可以手动刷新。项目的 JavaScript bundle 成功运行后才写入历史记录,按地址去重并保存三天。扫码使用系统扫码界面,无需额外申请相机权限;设备不支持扫码时会显示错误。

开发构建可通过 expo-harmony://open?url=... 链接打开项目,应用自己的深链接仍可正常使用。链接可附带 disableOnboarding=1、disableFab=1 或 disableAutoLaunch=1,分别用于跳过引导、隐藏浮动工具按钮或关闭启动时自动打开菜单。发布版本不会打开开发链接。

加载的项目需要与开发客户端包含的运行环境和原生功能相匹配。要打开已发布的项目,请安装 @expo-harmony/expo-updates,并输入提供兼容 HarmonyOS 更新的服务器地址。

从开发菜单选择 Home 会返回启动器。React Native JavaScript 运行时错误会保留三天;再次启动时,启动器会显示错误信息,不会自动重新打开出错项目。

暂不支持的内容

  • Expo 账户和 EAS 分支浏览。 上游使用 Android 和 iOS 原生界面完成浏览器登录回调、会话管理和 GraphQL 查询。SDK 57 随附的分支查询使用 AppPlatform,其定义只有 IOS 和 ANDROID。HarmonyOS 分支浏览需要服务端支持 HarmonyOS 平台,并提供适用的 Expo 登录回调。
  • 通用原生网络检查。 RNOH 已报告 React Native Networking 请求,Expo 自有的 expo/fetch 也会报告。上游启动器的拦截器依赖 Android 的 OkHttp 和 iOS 的 URLSession,RNOH 0.86 的 HTTP 拦截器仅作用于对应的客户端实例。直接通过 HarmonyOS Network Kit 发出的其他原生请求目前需要各自的网络实现提供观测。
  • 进程级崩溃恢复。 启动器恢复记录来自 React Native 运行时错误。HarmonyOS 系统原生崩溃由系统收集,HiAppEvent 可在应用重新启动后异步投递崩溃事件。启动器目前没有将这类报告关联到上一次运行的开发项目。HarmonyOS 崩溃事件说明
  • 按应用标识或用户筛选项目、查看签名证书或本地网络权限。HarmonyOS 开发客户端不提供这些信息。

Author

expo-harmony © Baoshuo, Released under the MIT License. Authored and maintained by Baoshuo with help from contributors.

Personal Website · Blog · GitHub @renbaoshuo · Twitter @renbaoshuo