react / react/react-native

`@react-native/assets` ships Flow instead of JS

未关闭
#36,343 5 条评论 9 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Never gets stale
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

Description

The assets package is shipping flow JS directly, making it break when importing on Next.js. It should build prior to publishing and remove types.

See: https://github.com/facebook/react-native/blob/main/packages/assets/registry.js

Let me know if I should PR, though I know TypeScript and not flow. Could also migrate it.

React Native Version

0.71

Output of npx react-native info

N/A

Steps to reproduce

See https://github.com/facebook/react-native/blob/main/packages/assets/registry.js

Snack, code example, screenshot, or link to a repository

If you need a repro, you can try importing @react-native/assets in Next.js. It's pretty self-explanatory though.

Thanks!

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 packages/assets/registry.js 开始,复现从 Next.js 导入 @react-native/assets 的过程。跟踪 assets 包的发布和构建配置,然后验证已发布的入口是没有 Flow 类型的编译后 JavaScript;当从 Next.js 导入成功时即完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, next.js, react-native
领域
build-system, mobile
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。